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
Explain output of printf("Hello World"-'A'+'B'); ?
When can a far pointer be used?
Do you know the difference between exit() and _exit() function in c?
What does %d do?
How are structure passing and returning implemented?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What are run-time errors?
What are header files and what are its uses in C programming?
What is the sizeof () a pointer?
What is enumerated data type in c?
What is pointer and structure in c?
What is a sequential access file?
Explain what are run-time errors?
What is the description for syntax errors?
What is a function in c?