
Implement gm_calloc, your own calloc, which allocates memory for an array of nmemb elements of size bytes each, sets every byte to zero, and returns the pointer (or NULL on failure).
gm_calloc(4, sizeof(int)) // read back the 4 intsExpected result
0 0 0 0For your own tracking. Tests grade your code.
gm_calloc(SIZE_MAX, SIZE_MAX) // would overflow, print "null" on NULLExpected result
nullExpected files
calloc.cAllowed functions
mallocAllowed headers
Standard C library
Implements the contract of a function from the standard C library.

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement gm_calloc, your own calloc, which allocates memory for an array of nmemb elements of size bytes each, sets every byte to zero, and returns the pointer (or NULL on failure).
gm_calloc(4, sizeof(int)) // read back the 4 intsExpected result
0 0 0 0For your own tracking. Tests grade your code.
gm_calloc(SIZE_MAX, SIZE_MAX) // would overflow, print "null" on NULLExpected result
nullExpected files
calloc.cAllowed functions
mallocAllowed headers
Standard C library
Implements the contract of a function from the standard C library.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.