Lesson 21 of 23
Dynamic Memory: malloc এবং free
10 min 35 XP
Size যখন শুধু run time-এ জানা যায়, তখন malloc দিয়ে heap memory চান। কাজ শেষে free দিয়ে ছেড়ে দিন, না হলে memory leak হয়।
Example: edit me and press Run
Output Loading C (first time takes a few seconds)
Press Run to see the result here.malloc বনাম calloc: calloc memory শূন্যও করে; realloc তার size বদলায়। Stack বনাম heap interview-এর ঘনঘন প্রশ্ন।