calloc

Example: callocMemory Allocation Functions

Allocates an array and initializes all elements to zero.

void *calloc( size_t num elems, size_t elem_size); 

num elemsThe number of elements in the array.
elem_sizeThe size of each element.

Return Values

Returns a void * type pointer to the allocated space. If the system could not allocate the requested block of memory or if any of the parameters was 0, returns a NULL pointer.

For calloc details, refer to your C language documentation.