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 can you increase the size of a dynamically allocated array?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
What is structure data type in c?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
How can I make it pause before closing the program output window?
What are the back slash character constants or escape sequence charactersavailable in c?
How would you obtain the current time and difference between two times?
What is formal argument?
What are pointers? What are different types of pointers?
Why we use void main in c?
Which is the best website to learn c programming?
Explain main function in c?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What is #ifdef ? What is its application?