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


Please Help Members By Posting Answers For Below Questions

What is bss in c?

592


How can I delete a file?

615


Is it valid to address one element beyond the end of an array?

664


What does a pointer variable always consist of?

653


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?

797






How do we print only part of a string in c?

577


What is meant by inheritance?

620


What is variable and explain rules to declare variable in c?

543


What is extern variable in c with example?

528


Explain what is the most efficient way to store flag values?

685


Do you have any idea how to compare array with pointer in c?

584


What is #pragma statements?

579


Why shouldn’t I start variable names with underscores?

613


Explain the advantages of using macro in c language?

566


What will be the outcome of the following conditional statement if the value of variable s is 10?

747