Correct Answer (Detailed Explanation is Below)
B.
calloc() initializes allocated memory to zero, while malloc() does not initialize it
Detailed Explanation
Answer: (B) calloc() initializes allocated memory to zero, while malloc() does not initialize it
The major basic difference between malloc() and calloc() is their initialization behavior.
malloc() allocates a requested amount of memory but does not initialize the contents.
calloc() allocates memory for a number of elements and initializes the allocated bytes to zero.
This distinction is frequently asked in C and C++ programming examinations.