f(char *p)
{
p=(char *)malloc(sizeof(6));
strcpy(p,"HELLO");
}
main()
{
char *p="BYE";
f(p)
printf("%s",p);
}
what is the output?
Answer Posted / hussain reddy
BYE
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Can you subtract pointers from each other? Why would you?
Write program to remove duplicate in an array?
What is substring in c?
Explain built-in function?
Explain union. What are its advantages?
Describe the order of precedence with regards to operators in C.
In a header file whether functions are declared or defined?
to find the closest pair
the question is that what you have been doing all these periods (one year gap)
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
Why is c called c?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
What are the preprocessor categories?
What is memory leak in c?
Is it possible to initialize a variable at the time it was declared?