Sunday 9 October 2011

Difference between malloc() and calloc()

malloc() is used for allocating single block of memory while calloc() is used for allocating multiple blocks of memory.

The default value of mallo() is garbage value while in calloc it is zero.

malloc() takes one argument while calloc() takes two arguments.

No comments:

Post a Comment