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

More Computer science flashcards

COP4538 27 cardsComputer science · EnglishAllixarForecast: The basics21 cardsComputer science · EnglishBriannaThe File System and Its Problems16 cardsComputer science · English—Griffith—User Interfaces11 cardsComputer science · English—Griffith—Database Systems: Users, Transactions and Logs186 cardsComputer science · EnglishBigBurt18ISDS 409: Networking Fundamentals (Chapters 1 & 3)125 cardsComputer science · EnglishEthanComputer Hardware and Peripherals89 cardsComputer science · EnglishPERAS,Windows Administration: Active Directory and Accounts70 cardsComputer science · EnglishJaySection 1.1-1.3: Windows Commands/OS58 cardsComputer science · EnglishpzxliModule 2 Key Terms47 cardsComputer science · EnglishJayCS 159 Lab 440 cardsComputer science · EnglishRusty09_ngn_und_sip34 cardsComputer science · Germansg

All Computer science decks

Study these decks in the app

Free on iPhone, Android, Mac and the web. Add any deck to your account in one tap.

Download on the App StoreGet it on Google Play
Study all 10 cards for free