Memory Allocation

Q1:
malloc() allocates memory from the heap and not from the stack.

A True

B False

ANS:A - True

If Memory is allocating at compile time (static allocation) then stack is use.

But if Memory is allocating at Run time (dynamic allocation) then Heap is use. And malloc is Dynamic allocation so it's clear that it is use heap.  



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.