M
Mohanasundaram
Hi All,
What is the difference between malloc and calloc other than the
point that calloc will initialize the memory to all zeros? This was an
interview question for me. All the books and references that I have
come across tells that calloc initialize the memory to all zeros. In
Herbert Shiltd's C/C++ reference I found that calloc returns a pointer
to an array. I want to understand in what way the memory returned by
malloc and calloc are different?
Regards,
Mohan.
What is the difference between malloc and calloc other than the
point that calloc will initialize the memory to all zeros? This was an
interview question for me. All the books and references that I have
come across tells that calloc initialize the memory to all zeros. In
Herbert Shiltd's C/C++ reference I found that calloc returns a pointer
to an array. I want to understand in what way the memory returned by
malloc and calloc are different?
Regards,
Mohan.