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

What is the difference between NULL and NUL?

733


What is line in c preprocessor?

618


How old is c programming language?

583


Is void a keyword in c?

582


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1450






pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2204


What is the use of header?

628


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

827


What is a example of a variable?

557


What are register variables? What are the advantage of using register variables?

689


Whats s or c mean?

597


What is unary operator?

662


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

617


How do you print only part of a string?

618


What does c mean before a date?

595