Memory Allocation - Programming

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.