Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1) In a C program (test.c), the main is declared as follows int main(int argc, c

ID: 3671176 • Letter: 1

Question

1)                 In a C        program (test.c), the main is declared as follows int main(int argc, char **argv) After compilation, when I run my program in the terminal like this: ./test -a -s   

     

                        What will argc’s value be? ___________   

                      What       will the C string pointed to by argv[0] contain?                             

                     What will the C string pointed to by argv[1] contain?         ___________                   

                      What will the C string pointed to by argv[2] contain?             ___________       

                      What will the C string pointed to by argv[3] contain?             ___________       

Explanation / Answer

What will argc’s value be 3

                      What       will the C string pointed to by argv[0] contain ./test

                     What will the C string pointed to by argv[1] contain    -a

                      What will the C string pointed to by argv[2] contain -s   

                      What will the C string pointed to by argv[3] contain null