C Programming - Memory Allocation - Discussion

Discussion Forum : Memory Allocation - True / False Questions (Q.No. 3)
3.
malloc() returns a NULL if it fails to allocate the requested memory.
True
False
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
3 comments Page 1 of 1.

Kistam gopi said:   10 years ago
It's right, malloc() true. Then returns the base address and additional address.

Its failed I/O returns base address.

Sanjeev said:   1 decade ago
malloc, realloc, calloc always returns null if they failed to allocate the memory. They returns base address if the allocation is success.

Dev said:   1 decade ago
Because it doesn't cantain any memory location to point out.

Post your comments here:

Your comments will be displayed after verification.