1.

What is returned by the function if the space cannot be allocated by the function malloc(), realloc() and calloc()?(a) value(b) error(c) null pointer(d) no valueThe question was asked in an internship interview.I would like to ask this question from General Utilities topic in chapter C Library of C

Answer»

The correct CHOICE is (c) NULL pointer

To explain: The pointer returned points to the lowest BYTE address of the allocated space. A null pointer is returned, if the space cannot be allocated.



Discussion

No Comment Found

Related InterviewSolutions