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.
Discussion:
3 comments Page 1 of 1.
Dev said:
1 decade ago
Because it doesn't cantain any memory location to point out.
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.
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.
Its failed I/O returns base address.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers