In the call calloc(n, size), what do the two arguments represent ?
Answer: A
Correct answer: The number of elements and the size of each element
calloc() multiplies the two arguments to find the total number of bytes, then clears them. Splitting the request in two lets the library detect an overflow in that multiplication, which a single-argument malloc() call cannot do.
Please log in or register to report this question.