Answer Posted / shruti
the syntax of malloc is wrong.
in your example it should be written as:
char *p;
p = (char *)malloc(sizeof(char));
| Is This Answer Correct ? | 21 Yes | 1 No |
Post New Answer View All Answers
How does #define work?
What do you understand by friend-functions? How are they used?
What is wild pointer in c?
How can I write functions that take a variable number of arguments?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What are global variables?
What is c basic?
Write a program to print ASCII code for a given digit.
Explain what are header files and explain what are its uses in c programming?
Explain what is output redirection?
What is a scope resolution operator in c?
Which node is more powerful and can handle local information processing or graphics processing?
What is the use of header files?
What is the difference between far and near ?
Stimulate calculator using Switch-case-default statement for two numbers