How argc and argv works in the following main function?main(int argc,char *argv[]) { int n,i=0; while(argv[1][i]!=\'\\0\') { n=fun(); i++;} printf(\

Showing Answers 1 - 1 of 1 Answers

mpanigrahi

  • Mar 22nd, 2006
 

*****main can recieve its own arguments but in a preconditioned way: main (int argc, char **argv) { ............ }*****% a.out 1 my_input argc is 3 argv[0] = "a.out" argv[1]="1" argv[2]="my_input"

  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