Examveda

How do you check if the 'malloc' function has successfully allocated memory in C?

A. Check if the return value is not NULL

B. Check if the return value is 1

C. Check if the return value is -1

D. Check if the return value is 0

Answer: Option A


This Question Belongs to C Program >> Memory Allocation

Join The Discussion

Related Questions on Memory Allocation