To String or ! To String
Vocabulary
Arrays & Vectors
Let's Point To It
Do You Have Class?
100

The two primary ways strings are stored in memory in C++

What are string objects and C strings.

100

The correct way to declare a constant member function myFunction() of type void in C++?

What is void myFunction() const;

100

How do we declare an integer vector named numbers and initialize it to 1, 2, 3?

vector<int> numbers {1, 2, 3}

or

vector<int> numbers = {1, 2, 3}

100

What is the value of *ptr + 2 in the following:

int values[] = 10, 20, 30, 40, 50;

int *ptr = values;

What is 12.

100

This provides a set of standard diagrams for graphically depicting OOP systems.

What are Unified Modeling Language (UML) diagrams.

200

What is displayed in the following code:

string word = "programming"; 

cout << word.substr(3, 4);


What is gram.

200

Which is NOT a valid C++ exception handling mechanism?

a) try  b) catch  c) throw  d) finally

What is finally?

200

How C++ passes arrays

What is by Reference.

200

Which of the following correctly declares an array in C++?

  a) array{10};     b) array array[10];
c) int array;     d) int array[10];


What is int array[10];  // Answer d


Because array variable and values need to be declared after the datatype only.

200

The term which refers to an object's ability to take different forms.

What is Polymorphism.

300

What is displayed?

string welcome = "Welcome to my nightmare!  \n";

welcome += "I think you're going to leave. \n";

welcome.resize(50, ' '); welcome.append(" like it. \n");

cout << welcome << endl;


Welcome to my nightmare!  
I think you're going to like it.

300

The two types of scope in C++

What is Local and Global Scope

300

What does the name of an array represent in C++?

What is the memory address of the first element

300

A ______ pointer is a pointer that refers to a memory location which has be freed or no longer valid.

What is dangling?

300

------------------------
--- DAILY DOUBLE ---
------------------------


What a subclass is also known as.

400

How do we determine the length of the following:

char myString[] =
"Did they get you to trade your heroes for ghosts? ";

What is strlen(myString)

400

The definition of a static variable.

What is a local variable that retains its value across function calls.

400

This member function will add an element to a vector

What is push_back()

400

In C language programmers use malloc() and free() for memory management.  What do C++ programmers use?

What is new and delete?

400

A member function that returns a value from a class's attribute but does not change it.

What is an accessor.

500

A statement to change an integer to string in C++.

What is to_string() or string Stream or sprintf().

500

What ADT refers to.

What is Abstract Data Type.  It specifies the values the data type can hold and the operations that can be done.

500

What member function of vectors will give you the number of elements of a vector?

What is size().

500

The three types of pointers identified by the textbook.

What are unique_ptr, shared_ptr, and weak_ptr.

500

What a line with an open arrowhead in an UML diagram from a subclass to the base class represents.

What is inheirtance.