Command-Line
If a program with argc and argv declared is compiled with executable called a.out, then after
a.out file1 5
the two parameters, argc and argv[], will contain following values when the program starts.
argc
3
argv
argv[0]
argv[1]
argv[2]
"a.out"
"file1"
"5"
Previous slide
Next slide
Back to first slide
View graphic version