Find the output of the following C programvoid f(char *p){p=(char *) malloc(6);strcpy(p,"hello");}void main( ){char *P="bye";f(p);printf("%s',p);}

Showing Answers 1 - 2 of 2 Answers

Amit Dhamija

  • Aug 14th, 2005
 

bye will get printed

  Was this answer useful?  Yes

Ashish and Arafat

  • Sep 25th, 2006
 

Error in the program: Undefined symbol p.

Warning in the program: P has assingned a valur that is never used.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions