Basics
Control Flow
Functions

Containers
Classes
100

The code for setting the float variable, myFloat, to 0.16.

What is float myFloat = 0.16;?

100

The value of myNum.

int main()

{

  int myNum = 15;

  myNum %= 4;

  return 0;

}


What is 3?

100

The return type for a function that doesn't return anything.

What is void?

100

The first index of all containers.

What is 0?

100

The 2 types of files that classes need.

What are the header (.h) and the source (.cpp) files?

200

The importance of having descriptive variable names.

What is give meaning/context to the values that the variables represent?

200

The range of rd() % 20.

What is 0 to 19?

200

The value of myNum.

void addOne(int num); // function declaration

int main() {

    int myNum = 1;

    addOne(myNum);

    return 0;

}

What is 1?

200

The value of answer.

string ex = "No way";

int answer = ex.find("o");

What is 1?

200

Header files ____ functions and source files ____ them.

What is declare and define?

300

The library that you need for printing and getting user input.

What is iostream?

300

The number of times this for loop will iterate.

for (int i = 0; i < 31; i += 3) {

    cout << "Pie Scorch!" << endl;

}

What is 11?

300

The output of this code. (Can be general about answer.)

int main() {

    int myNum = 7;

    cout << &myNum << endl;

}

What is the address of myNum?

300

The code for making the vector, myString, which contain strings.

What is vector<string> myString;?
300

The name of functions that make objects.

What is constructor?

400

The importance of the pch or stdafx libraries.

What is build your solution in Visual Studio?

400

The value of myNum.

int myNum = 0;

int case = 1;

switch (case) {

case 0:

        myNum = myNum + 1;

case 1:

        myNum = myNum + 1;

case 2:

        myNum = myNum + 1;

}

What is 2?

400
The point of this function.

void myFunc(int myNum) {

    if (myNum % 2 == 0) 

        cout << "Da" << endl;

    else

        cout << "Ja" << endl;

}

What is check if the number is even?

400

The code for a for each loop if there is an array of integers named myNums.

What is ...

for (int num : myNums) {
}

...?

400

These things usually go in the private section of classes.

What are variables?

500

The importance of header files.

What is share code between files or organize your code?

500

The code for properly opening "open_me.txt" and writing "Hello!" in it. (Don't need to check if it opened successfully. Hint: 6 lines.)

What is...

#include <fstream>

using namespace std;

fstream file;

file.open("open_me.txt", ios::out);

file << "Hello!";

file.close();

...?

500

The name of the operator, *.

What is the dereference operator?

500

The difference between arrays and vectors.

What is arrays have a fixed size and vectors are dynamic?
500
All functions in a class need this in front to show they are part of the class.

What is scope indicator?

M
e
n
u