Vidyalelo
C Programming · Q213

File Input Output

Programming · C Programming · question 213

Q213

What if size is zero in the following C statement? realloc(ptr, size)

A.
Allocate a memory location with zero length
B.
Free the memory pointed to by ptr
Answer
C.
Undefined behaviour
D.
Doesn't do any reallocation of ptr i.e. no operation

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board