Realloc and Calloc Quiz

Test understanding of realloc and calloc


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. For this custom API, my_realloc(p,0) returns NULL for a live p. What is the ownership result?

Select one answer.

2. A positive-size growth fails. Which implementation order preserves the contract?

Select one answer.

3. A 10-byte block grows to 18 through a new allocation. What byte initialization is required?

Select one answer.

4. A custom calloc request has count=7 and element size=6, with no overflow. How many requested bytes must be zeroed?
Join Discord