For the following C programint x(char *a){a=(char *) malloc(10*sizeof(char));*a="hello";}main(){char *a="new";x(a);printf("%s",a);}The output isA. HelloB. NewC. Hello newD. Run time error

Showing Answers 1 - 2 of 2 Answers

madhu

  • Aug 10th, 2005
 

new. 
locally assigned value

  Was this answer useful?  Yes

Amit Dhamija

  • Aug 14th, 2005
 

new will get printed.

  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