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
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
How can you invoke another program from within a C program?
What is the use of static variable in c?
What is the difference between c &c++?
What is a lookup table in c?
Is c easier than java?
Are pointers really faster than arrays?
What is the use of bitwise operator?
Which type of language is c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is integer constants?
Explain union.
Write a program to print numbers from 1 to 100 without using loop in c?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?