Loops
Arrays
Variables
Functions
Miscellaneous
100

A loop that executes a block of code as long as a specific condition is true.

What is a while loop?

100

The number of the starting index of an array.

What is 0?

100

 Data type that is imported from a library and stores text such as "Hello World".

What is string?

100
A line of code that informs compiler about a function definition created by the user.

What is a function prototype?

100

The keyword used to take in user input from the console.

What is cin >>?

200

The statement that increments this for loop by one and represents the ? in the following code. Ex: for (int i = 0; i < 7; ?)

What is i++?

200

This structure is used to iterate through the elements of a one dimensional array.

What is a loop?

200

This is the size of the double data type in C++.

What is 8 bytes?

200

A predefined function, located in the cmath library, used to raise a number to a power.

What is pow?

200

 A flow of control statement that is not an if statement and is used to execute the different blocks of statements based on the value of the given expression.

What is a switch statement?

300

Punctuation symbols that must be used to surround a loop when there are multiple lines of code.

What are curly braces ({})?

300

This structure is used to iterate through the elements of a two dimensional array.

What is a nested loop?

300

The output printed by the line of code cout << 7/2;

What is 3?

300

A character is used to indicate that a parameter in the function is call by reference, rather than call by value.

What is &(ampersand)?

300

A C++ library that must be included when reading or writing to a text file.

What is fstream?

400

The general time complexity of a single for loop that goes from 1 to a number n.

What is O(N)?

400

The amount of space an integer array of size 10 would take up.

What is 40 bytes?

400

The character that terminates a C-String.

What is \0?

400

A keyword used in a function to indicate it has no return value.

What is void?

400

 A function from the iomanip library that controls the amount of decimal places.

What is setprecision()

500

int num = 4;       

do {

        cout << "Hello.\n";

        num ++;

    } while (num < 4);


while (num < 7){

 cout << "Hello.\n";

 num ++;

}

The amount of times Hello will be printed in the above code. 

What is 3?

500

This line of code creates an two-dimensional integer array called board with 3 rows and 4 columns.


What is int board[3][4];?

500

int a = 5, b = 10;

int temp;

Given the above code, these are three lines of code that swap the values of a and b.

What is temp = a; a = b; b = temp;?

500

int main () {

   int a = 100, b = 200;

   mySwap(a,b);

   return 0;

}

void mySwap(int x, int &y) {

   int temp = x;   

   x = y;  

   y = temp;  

}

The value of a and b after the above lines of code.

What is 100?

500

ifstream inputFile("input.txt");

    if (!inputFile) {

        cerr << "Error opening the file." << endl;

        return 1;

    }

    int number;

while (?) {

        inputFile >> number;

}

The condition represented by the ? in the above code that allows the user to read until the end of the file.

What is !inputFile.eof()?

M
e
n
u