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


Please Help Members By Posting Answers For Below Questions

What is volatile, register definition in C

680


What is calloc malloc realloc in c?

585


How would you obtain the current time and difference between two times?

719


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.

1054


Explain how can type-insensitive macros be created?

564






What does node * mean?

703


How do c compilers work?

602


What are the three constants used in c?

538


What is the description for syntax errors?

607


What is logical error?

597


What is meant by realloc()?

668


Can you tell me how to check whether a linked list is circular?

757


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

589


What is the difference between exit() and _exit() function in c?

576


How do you determine whether to use a stream function or a low-level function?

637