Main difference between malloc and calloc?
Choose the correct option from below list
(1)Both are same
(2)malloc & calloc allocates memory, but calloc initializes that memory block with zeros, whereas malloc won't.
(3)Both are completely different
(4)None of above
Answer:-(2)malloc & calloc allocates memory, but calloc initializes that memory block with zeros, whereas malloc won't. | |