free

calloc

#include <stdlib.>void *calloc(size_t num, size_t size);

The calloc( ) function allocates memory the size of which is equal to num * size. That is, calloc( ) allocates sufficient memory for an array of num objects of size size. All bits in the allocated memory are initially set to zero.

The calloc( ) function returns a pointer to the first byte of the allocated region. If there is not enough memory to satisfy the request, a null pointer is returned. It is always important to verify that the return value is not null before attempting to use it.

Related functions are free( ), malloc( ), and realloc( ).




C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net