If the program (myprog) is run from the command line as myprog 1 2 3 , What would be the output? main(int argc, char *argv[]) { int i; for(i=0;i<argc;i++) printf("%s",argv[i]); } a) 1 2 3 b) C:MYPROG.EXE 1 2 3 c) MYP d) None of the above

This question is related to Sonata Interview

Showing Answers 1 - 2 of 2 Answers

kiran

  • May 21st, 2006
 

the answer is b) C:myprog.exe 1 2 3 . the relative path of the file is passed as the first argument for main method by default.then followed by others.

  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