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 / yellareddy
After removing the error, the output is "bye"
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is typedef?
Explain the use of #pragma exit?
What is the collection of communication lines and routers called?
What is the advantage of using #define to declare a constant?
Write a program to reverse a given number in c?
What is switch in c?
Is null valid for pointers to functions?
Explain how do you search data in a data file using random access method?
How pointer is different from array?
Define VARIABLE?
How to explain the final year project as a fresher please answer with sample project
Why can't I perform arithmetic on a void* pointer?
How can I invoke another program or command and trap its output?
Write a program to implement queue.
Why can’t we compare structures?