1.

If the following program (myprog) is run from the command line as _x005F_x000D_ myprog 1 2 3 _x005F_x000D_ what would be the output?_x005F_x000D_ main(int argc, char *argv[])_x005F_x000D_ {_x005F_x000D_     int i, j = 0;_x005F_x000D_     for (i = 0; i < argc ; i++)_x005F_x000D_            j = j + atoi ( argv[i]);_x005F_x000D_     printf ("%d", j);_x005F_x000D_ }

A. 123
B. 6
C. Error
D. "123"
Answer» C. Error


Discussion

No Comment Found

Related MCQs