what's the return value of malloc()

Answer Posted / sourisengupta

malloc returns a pointer to the allocated space if required
memory is available otherwise it will return a null pointer.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is #define used?

788


Tell me when would you use a pointer to a function?

603


To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9

2182


Tell us bitwise shift operators?

592


What is methods in c?

637






Explain what is dynamic data structure?

642


plz let me know how to become a telecom protocol tester. thank you.

1740


How can I find the modification date of a file?

698


What is include directive in c?

642


Is it possible to initialize a variable at the time it was declared?

755


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

775


What is a lookup table in c?

622


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15487


What does it mean when a pointer is used in an if statement?

598


What are multidimensional arrays?

656