Allocates an array which is set to binary zeros.
void * calloc (size_t num, size_t size);
Required Header |
<stdlib.h> |
Return Value
This function returns a pointer to the new array. A null pointer value indicates an error.
Parameters
num
The number of elements in the array
size
The size in bytes of each element
Remarks
The calloc function allocates a heap memory block large enough for num * size bytes and sets the area to binary zeros.