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
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
Explain what is a const pointer?
Why pointers are used in c?
Write a program to check prime number in c programming?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What is static volatile in c?
How does normalization of huge pointer works?
What is the difference between the = symbol and == symbol?
Write programs for String Reversal & Palindrome check
When is a null pointer used?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
What is cohesion and coupling in c?
write a c program in such a way that if we enter the today date the output should be next day's date.
How do I round numbers?
What does *p++ do? What does it point to?