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
What is bss in c?
How can I delete a file?
Is it valid to address one element beyond the end of an array?
What does a pointer variable always consist of?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
How do we print only part of a string in c?
What is meant by inheritance?
What is variable and explain rules to declare variable in c?
What is extern variable in c with example?
Explain what is the most efficient way to store flag values?
Do you have any idea how to compare array with pointer in c?
What is #pragma statements?
Why shouldn’t I start variable names with underscores?
Explain the advantages of using macro in c language?
What will be the outcome of the following conditional statement if the value of variable s is 10?