what's the return value of malloc()

Answer Posted / shashidhar murthy

malloc returns a pointer to the allocated space if required
memory is found, else, a null pointer is returned and
'errno' is set to indicate the error.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c pass by value or reference?

595


What is maximum size of array in c?

584


What is a null string in c?

589


What are local static variables? How can you use them?

647


Who developed c language?

642






What are # preprocessor operator in c?

632


What is typedef example?

616


How do you write a program which produces its own source code as output?

608


Does free set pointer to null?

563


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

603


What is a far pointer in c?

599


Is fortran still used today?

604


What are keywords in c with examples?

604


Write a program to print numbers from 1 to 100 without using loop in c?

641


The file stdio.h, what does it contain?

667