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

Answer Posted / guest

The pointer you declared is p, not *p.

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the 'named constructor idiom'?

645


Explain Basic concepts of C language?

650


What are the application of void data type in c?

723


Explain about the constants which help in debugging?

858


Is c dynamically typed?

671






Explain how can I write functions that take a variable number of arguments?

619


explain what is fifo?

636


Explain what does the function toupper() do?

638


How do we open a binary file in Read/Write mode in C?

685


What are the advantages of external class?

598


Explain modulus operator. What are the restrictions of a modulus operator?

603


Explain what are header files and explain what are its uses in c programming?

631


What is a macro, and explain how do you use it?

631


Can we declare variable anywhere in c?

539


How are structure passing and returning implemented?

594