Page 1 of 1

What if size is zero in the following C statement?

Posted: Wed Jul 13, 2022 7:54 pm
by answerhappygod
realloc(ptr, size)
a) Allocate a memory location with zero length
b) Free the memory pointed to by ptr
c) Undefined behaviour
d) Doesn’t do any reallocation of ptr i.e. no operation