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 LINKED LIST? How can you access the last element in a linked list?
What is the purpose of realloc()?
How many keywords (reserve words) are in c?
What is string in c language?
What is call by reference in functions?
Explain what happens if you free a pointer twice?
what is bit rate & baud rate? plz give wave forms
Is c++ based on c?
Why enum is used in c?
What is a 'null pointer assignment' error?
a program that can input number of records and can view it again the record
Explain what are global variables and explain how do you declare them?
What does volatile do?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What are the key features in c programming language?