Examveda

What is the difference between 'malloc' and 'calloc' in C?

A. 'malloc' allocates uninitialized memory, 'calloc' allocates and initializes to zero

B. 'malloc' allocates and initializes to zero, 'calloc' allocates uninitialized memory

C. 'malloc' is used for arrays, 'calloc' is used for single elements

D. 'malloc' allocates memory from the stack, 'calloc' allocates from the heap

Answer: Option A


This Question Belongs to C Program >> Memory Allocation

Join The Discussion

Related Questions on Memory Allocation