src/projects/libc/stdlib/calloc.c
void* calloc(size_t num, size_t size) {
    size_t amount = num * size;
    void* result = malloc(amount);
    memset(result, 0, amount);
    return result;
}
/*
 * Allocate and zero-initialize an array.
 *
 * Allocates a block of memory for an array of num elements, each of them size bytes long, and initializes all its
 * bits to zero.
 */
Allocate and zero-initialize an array.
Allocates a block of memory for an array of num elements, each of them size bytes long, and initializes all its
bits to zero.
Allocate and zero - initialize an array . Allocates a block of memory for an array of num elements each of them size bytes long and initializes all its bits to zero .
void* calloc(size_t num, size_t size) {
    size_t amount = num * size;
    void* result = malloc(amount);
    memset(result, 0, amount);
    return result;
}
void * calloc ( size_t num , size_t size ) { size_t amount = num * size ; void * result = malloc ( amount ) ; memset ( result , 0 , amount ) ; return result ; }
Allocate and zero-initialize an array.
Allocate and zero - initialize an array .