+ 1
What is calloc ?
3 odpowiedzi
+ 2
Calloc is a function!
D
It's declaration is:
void *calloc(size_t nitems, size_t size);
First argument is the number of items you need and second is the size of each item.
It allocates memory for these items and initialize it's values to null and that is the main difference between calloc and malloc
+ 1
Thanks bro Lighton
+ 1
It stands for contagious allocation .
It is used under the header file stdio.h .
It stores the memory dynamically
It allocates multiple blocks of storage each of same size and sets all bytes to 0.
It is generally used for storing arrays.