C examples for Memory:calloc
calloc() function takes two arguments:
#include <stdio.h> #include <stdlib.h> int main()/*from ww w .j a v a2 s . c o m*/ { int *numbers; numbers = (int *) calloc(10, sizeof(int)); if ( numbers == NULL ) return 1; // return if calloc is not successful return 0; }