c calloc

C
// The Malloc way
void *ptr = malloc(sizeof(Type) * n_elem);
// The Calloc way
void *ptr = calloc(sizeof(Type), n_elem);ptr = (castType*)calloc(n, size);void *calloc(size_t nitems, size_t size)
Source

Also in C: