Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, March 11, 2015

What is calloc function ?

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