Classes
Dynamic Arrays
Pointers
Recursion
Miscellaneous
100

The term used for the instantiation of a class. Example: Car Porsche;

What is an object?

100

A keyword that is used to create space for the dynamic array.

What is new?

100

 A symbol that can be placed before a variable to give its address in memory.

What is &?

100

The non-recursive part of a recursive function.

What is a base case?

100

A group of data elements grouped together, similar to a class, but with no functions.

What is a struct?

200

Data members that only a class's member functions can access.

What are private data members?

200

A symbol is used to create the pointer variable that saves the location of the first element of the dynamic array.

What is *?

200

A keyword that initializes a pointer variable to point to nothing.

What is nullptr?
200

A searching algorithm that divides a sorted list into halves to search more efficiently, and is implemented both recursively and non-recursively.

What is binary search?

200

A sequential search algorithm that starts at one end and goes through each element of a list until the desired element is found (Travels through the entire list).

What is linear search?

300

A special class member function that is called automatically and initializes data members when a variable of that class type is declared.  Example: Restaurant();

What is a constructor?

300

A dynamic array-like container that is part of a C++ library and allows for dynamic sizing and automatic memory management (basically a better version of dynamic arrays).

What is a vector?

300

A character that can be added in front of a pointer to retrieve data that pointer is pointing to (Deferencing).

What is *?

300

The region of memory where recursive calls are stored until the function is returned.

What is the stack?

300

The theoretical measure of the execution of an algorithm, usually the time or memory needed, given the problem size n, which is usually the number of items. (Describes the upper bound of an algorithm's performance)

What is big O notation?

400

A symbol that goes in front of a class destructor function

What is tilde(~)?

400

A member function of the vector class, and is used to add an element to the end of the vector, dynamically increasing its size.

What is push_back()?

400

letterPointer = &userLetter;

userLetter = 'A';

*letterPointer = 'C';

cout << userLetter;

 This is the output of the above code.

What is C?

400

General name for the algorithm that uses recursion by dividing problems into smaller subproblems and calls them recursively

What is divide and conquer?

400

A datatype made up of member variables, similar to structs, but sharing the same memory location, meaning that memory will limit using the variables at the same time. (The programmer creates the members just like structs).

What is a union?

500

class Test{

   private:

   int x;

   public:

   void setX (int x)

   {

       x = x;

   }

A keyword as well as a symbol should be added in the setX function to correctly access the private class member variable x in the above code.

What is this ->?

500

    ? = new int*[rows];

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

        matrix[i] = new int[cols];

    }

The line of code that replaces the ? in the above code and completes the dynamic allocation of the two dimensional array, matrix.

What is int ** matrix?

500

struct Node {

    int data;

    ?;

};

The line of code, represented by ?, is part of the Node structure of a linked list and allows the user to go to the next node in the list.

What is Node * next?

500

int factorial(int n) {

    # base case

    if (n == 0 || n == 1) {

        return 1;

    } else {

        ?;

    }

}

This one line of code is the recursive part of the factorial function above, and is represented by ? above (Example of factorial: 4! = 4 * 3 * 2 * 1)

 What is return n * factorial(n - 1)?

500

struct Node {

    int data;

    Node* next; };

~LinkedList() {

        while (?) {

            Node* temp = head;

            head = head->next;

            delete temp;}

    }

The ? is the condition used for the while clause to deallocate memory in the destructor.

What is (head != nullptr) or (head)?