The calloc() is a dynamic memory allocation function used to
provide multiple blocks of storage space.
The main difference between malloc()
and calloc() is that malloc() allocate only a single block of memory space and
a calloc() allocate multiple blocks of memory space.
Sy:
pointr = (data_type *) calloc( number, sizeof( data type ));
ex:
ptr = (int *)calloc(10,sizeof(int));
No comments:
Post a Comment