Home » C Programming » Command Line Arguments

If the following program (myproc.c) is present in the directory "C:\TC" then what will be output of the program if run it from DOS shell? /* myproc.c */ #include int main(int argc, char *argv[]) { printf("%s", argv[0]); return 0; }

Correct Answer: C:\TC\MYPROC.EXE

Explanation:

In order to execute it from DOS shell, we have to run the created EXE file by entering the exe file name as C:\TC>myproc <enter>.

← Previous Question Next Question→

More Questions from Command Line Arguments

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion