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 1 2 3

    /* myprog.c */
     #include 
     #include
    
      int main(int argc, char **argv)
      {   
         int i, j=0;  
         for(i=0; i"%d\n", j); 
       return 0; 
    } 

     

  2. A.

    123

    B.

    6

    C.

    Error

    D.

    "123"

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment