Home / C Programming / Command Line Arguments :: Discussion

Discussion :: Command Line Arguments

  1. What will be the output of the program (myprog.c) given below if it is executed from the command line?
    cmd> myprog one two three

      /* myprog.c */
      #include 
      #include 
    
      int main(int argc, char **argv)
      {    
           int i;   
           for(i=1; i3; i++)    
              printf("%u\n", &argv[i]);   
            return 0;
       } 

    If the first value printed by the above program is 65517, what will be the rest of output?

  2. A.

    65525 65531

    B.

    65519 65521

    C.

    65517 65517

    D.

    65521 65525

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment