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 / fazlur rahaman naik
actually the above programme produces an error.because u've
to mention which type of pointer it is at fuction f(*p).
i.e f(char *p).
if u correct this error.then the out put will be
bye
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
How to find a missed value, if you want to store 100 values in a 99 sized array?
Describe the order of precedence with regards to operators in C.
What are the __date__ and __time__ preprocessor commands?
Write a program to reverse a given number in c language?
How can I get back to the interactive keyboard if stdin is redirected?
What is the difference between strcpy() and memcpy() function in c programming?
How can I read/write structures from/to data files?
Write a program to use switch statement.
Is using exit() the same as using return?
What is line in c preprocessor?
Does * p ++ increment p or what it points to?
What is pointer to pointer in c?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What is a string?
What is memcpy() function?