3.1-3.4
3.5-3.7
3.8-3.9
3.10
3.11
100
What can cin be used to do?
cin can be used to read data typed at the keyboard
100
What are arguments?
Arguments are information being sent to the function;
100

int i = 0;
if(i >= 0)
{
 cout << i << endl;
}

0
100
int, double, char, string, etc. are examples of what?
types
200
What does cin stand for?
console input
200
On some C++ compilers ____ arguments will also work a) integer b) expressions c) cin d) sixtynine
integer
200

bool ShouldContinue = true;
while(ShouldContinue)
{
 ShouldContinue = false;
 cout << "hi!" << endl;
}

hi!
200

int n = 6;
if(isDivisibleBy2(n))
{
 cout << "divisible by 2" << endl;
}
else if(isDivisibleBy3(n))
{
 cout << "divisible by 3" << endl;
}

divisible by 2
200

What are the things between the parentheses called?
int sum(int n1, int n2)

arguments or parameters to a method
300
In the popular Nickelodeon TV show "SpongeBobSquarePants" where does SpongeBob work?
The Krusty Krab
300
What type do you use to read a text file? (hint: c??)
cin
300

int i = 0;
do
{
  cout << i << endl;
 ++i;
} while(i < 3);

0
1
2
300

string movie = "Sleepy Hollow";
if(movie == "sleepy hollow")
{
 cout << "found it" << endl;
}

This space has been intentionally left blank.
300
ifstream, ofstream, string, are what?
Classes
400
What is ">>" ? What does this mean?
This is the stream extraction operator which extracts characters from the input stream so they can be used in the program; gets characters from the stream object on its left and stores them in the variable whose name appears on its right
400
Can you use exponents in C++?
NOOOOOOOOO!!!!!!!!!!!!!
400

int i = 3;
do
{
 cout << i << endl;
 --i;
} while(i > 0);

3
2
1
400

string movie = "Terminator";
if(movie == "Terminator") && movie.find("Term") != string::npos)
{
 cout << "found it" << endl;
}

found it
400

What are lines of code that begin with // called?

e.g.,
// what are these called?

comments
500
Where is the placement of characters from the keyboard that a user enters? What does cin do when it reads these characters?
input buffer, or keyboard buffer; cin automatically converts them to the data type of the variable where the input data will be stored
500
What will be the value in outcome = 12 + 6 / 3 a) 12 b) 14 c) 6 d) Undefined
14 because the division operator has higher precedence than the addition operator
500

for(int i = 0 ; i < 5; ++i)
{
 cout << (i + 1 * 2) << endl;
}

2
3
4
5
6
500

string movie = "Lord of the Rings";
string userMovie = "lord";
if(movie == userMovie)
{
 cout << "case 1" << endl;
}
else if(movie.find(userMovie) != string::npos)
{
 cout << "case 2" << endl;
}
else
{
 cout << "else" << endl;
}

else
500
What's the difference between running with and without a debugger?
If you run without a debugger, breakpoints are ignored.