f(*p)
{
p=(char *)malloc(6);
p="hello";
return;
}
main()
{
char *p="bye";
f(p);
printf("%s",p);
}
what is the o/p?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / yellareddy
After removing the error, the output is "bye"
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / subbu
after correction of error, the output will be hello
| Is This Answer Correct ? | 1 Yes | 2 No |
how to find that no is int or float?
What is memmove?
Write a program to print prime nums from 1-20 using c programing?
what is a NULL pointer?
errors in computer programmes are called
Can you tell me how to check whether a linked list is circular?
whitch value return void main?
what is meant by c
What's wrong with "char *p = malloc(10);" ?
What would be an example of a structure analogous to structure c?
What is null character in c?
which header file contains main() function in c?
17 Answers Google, HCL, TCS,