O'Reilly logo
  • xxz180023 thinks this is interesting:

malloc, which allocates a specified number of bytes of memory. The initial value of the memory is indeterminate.

2. calloc, which allocates space for a specified number of objects of a specified size. The space is initialized to all 0 bits.

3. realloc, which increases or decreases the size of a previously allocated area. When the size increases, it may involve moving the previously allocated area somewhere else, to provide the additional room at the end. Also, when the size increases, the initial value of the space between the old contents and the end of the new area is indet...

From

Cover of Advanced Programming in the UNIX® Environment, Third Edition

Note

What is the difference among the three allocation operations?