1.

In the function malloc(), each byte of allocated space is initialized to zero.(a) True(b) FalseI got this question by my school teacher while I was bunking the class.This intriguing question comes from DMA Functions, Memory Leak, Dangling Pointers topic in portion Dynamic Memory Allocation in C of C

Answer»

The correct OPTION is (b) False

The best explanation: In the function MALLOC(), allocated space is initialized to junk values. In calloc(), each BYTE of allocated space is initialized to zero.



Discussion

No Comment Found

Related InterviewSolutions