what's the return value of malloc()

Answer Posted / ravi a joshi

malloc() returns pointer to void. That is, pointer to the
first memory location of the allocated memory block. The
pointer type is unknown at this point, hence typecasting is
done later.

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you override a defined macro?

587


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

646


Do variables need to be initialized?

621


What is bubble sort in c?

637


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

1918






Can a variable be both const and volatile?

676


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

689


define string ?

669


What is variables in c?

607


Why do we use main function?

637


What is the purpose of scanf() and printf() functions?

723


Explain the properties of union.

609


How do I use void main?

632


Explain what is the benefit of using #define to declare a constant?

609


What are the __date__ and __time__ preprocessor commands?

574