πŸ“Š C Programming
Q. What is the return value of malloc() if memory allocation fails?
  • (A) 0
  • (B) NULL
  • (C) -1
  • (D) Nothing
πŸ’¬ Discuss
βœ… Correct Answer: (B) NULL

Explanation: malloc() returns NULL if it fails to allocate memory.

Explanation by: Mr. Dubey
malloc() returns NULL if it fails to allocate memory.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
59
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate