Loops
Arrays
Functions
Architecture
Miscellaneous
100

The keyword that exits a loop immediately.

What is break?

100

This can be used to access the last element of an array int arr[10];

What is arr[9]?

100

This keyword in C++ is used to exit a function and optionally provide a value back to the calling code?

What is return?

100

This component of the computer is considered the "brain" and performs most of the processing inside the system.

What is a CPU?

100

The operator used to get the remainder of a division?

What is % (modulo/modulus)?

200

The contents of this type of loop can still run when the condition is false.

What is a do-while loop?

200

This is used to access the element in the 2nd row and 3rd column of a two-dimensional array int arr[4][5];

What is arr[1][2];?

200

This predefined function in C++ is used to convert uppercase characters to their lowercase equivalents.

What is tolower()?

200

The two numbers used to represent the on and off signals in binary code that are used by computers for communication.

What are 0 and 1?

200

This keyword makes a variable unchangeable

What is const?

300

The keyword that skips the current iteration of a loop

What is continue?

300

The amount of bytes an double array of size 5 would take up.


What is 40 bytes?

300

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

What is void?

300

This is what the acronym RAM stands for.


What is random access memory?

300

This I/O manipulator in C++ sets the width of the next input/output field to a specified number of characters

What is setw()?

400

int i = 0; 

do {    

cout << i;    

i++; 

} while (i < 3);

The output of this loop.

What is 012?

400

The output of the following code.

int arr[5] = {2, 4, 6, 8, 10};

int sum = 0;

for (int i = 0; i < 5; i += 2) {

    sum += arr[i];

}

cout << sum;

What is 18?

400

The correct syntax to declare a function addNums that returns an integer and takes two integer parameters a and b, where b has a default value of 100 .

What is int addNums(int a, int b=100);?

400

This is the amount of bits in a byte.

What is 8?

400

The value of result when message is initialized to "Great Lady".

 int result = strcmp(message, "Great Lady") 

What is 0? 

500

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

    for (int j = 0; j <= 4; j++) {        

         for (int k = 0; k < 2; k++) {cout << "Hello";}   } }

The amount of times Hello will be printed.

 What is 30?

500

int arr[] = {2, 4, 6, 8};

This line of code prints the size of this array.

What is cout << sizeof(arr)/sizeof(arr[0]);? (You can replace 0 with 1, 2, or 3)

500

The output of the following code. 

int multiply(int x, int y = 4) {    return x * y; } 

int result = multiply(5) + multiply(3, 6); 

cout << result;

What is 38?

500

The exact amount of bytes in a kilobyte.

What is 1024 or 2^10?

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() / inputFile?

M
e
n
u