Answer Posted / poornima
Nothing wrong.Its fine..
if u hve further doubt run the below code.
#include<stdio.h>
int main()
{
char *p=malloc(10);
if(p==NULL)
{
printf("malloc failed");
exit(0);
}
else
{
printf("malloc success\n");
p="hai";
printf("%s",p);
}
return 0;
}
o/p:
malloc success
hai
| Is This Answer Correct ? | 6 Yes | 10 No |
Post New Answer View All Answers
What does sizeof function do?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
What is the role of this pointer?
What is void pointers in c?
What is the sizeof () operator?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
What are the 4 data types?
How can I direct output to the printer?
What do you understand by friend-functions? How are they used?
What is else if ladder?
Is sizeof a keyword in c?
How can you check to see whether a symbol is defined?
explain what is fifo?
What is void main () in c?
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.....