What's wrong with "char *p = malloc(10);" ?

Answer Posted / splurgeop

malloc return an adress to the free memory..so we shud
store the adress i.e.
the above should be

char p=malloc(10);

Is This Answer Correct ?    1 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a progrmm in c language take user interface generate table using for loop?

1799


What are the types of type specifiers?

802


List out few of the applications that make use of Multilinked Structures?

1736


When should I declare a function?

822


What are c preprocessors?

915


What is hash table in c?

778


What extern c means?

738


Explain About fork()?

843


What is formal argument?

875


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1710


What is calloc() function?

855


What is self-referential structure in c programming?

886


What does c mean in basketball?

758


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

918


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

959