c calloc
snippet in c

c calloc

user8451

// The Malloc way
void *ptr = malloc(sizeof(Type) * n_elem);
// The Calloc way
void *ptr = calloc(sizeof(Type), n_elem);

C malloc

user4439

ptr = (cast-type*)calloc(n, element-size);

allocate memory c

user8732

ptr = (castType*)calloc(n, size);

c calloc

user9566

void *calloc(size_t nitems, size_t size)