Argc Argv

10 flashcardsby John
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
What are the only two parameters main is allowed to have?
argc and argv
2
What is argc?
Argument count
3
What data type is argc?
int
4
What is argv?
Argument values
5
What data type is argv?
Array of characters
6
If argc is equal to 2, then how many arguments does your program have?
1
7
True of False You can use argc to check if the user is running your program with the correct number of arguments
True
8
Whenever you use argv, unless you are just printing out the strings, you should
convert them to C++ strings or use stringstreams to change them to other data types (ints, doubles, etc)
9
It is good practice to check _________ at the beginning of the program to verify the user ran the program with the correct number of arguments.
argc
10
Always check __________ before using __________
argc, argv
Study all 10 cards for free