f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
Answer Posted / subbu
after correction of error, the output will be hello
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is volatile, register definition in C
What is calloc malloc realloc in c?
How would you obtain the current time and difference between two times?
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 how can type-insensitive macros be created?
What does node * mean?
How do c compilers work?
What are the three constants used in c?
What is the description for syntax errors?
What is logical error?
What is meant by realloc()?
Can you tell me how to check whether a linked list is circular?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
What is the difference between exit() and _exit() function in c?
How do you determine whether to use a stream function or a low-level function?