The two primary ways strings are stored in memory in C++
What are string objects and C strings.
The correct way to declare a constant member function myFunction() of type void in C++?
What is void myFunction() const;
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}
What is the value of *ptr + 2 in the following:
int values[] = 10, 20, 30, 40, 50;
int *ptr = values;
What is 12.
This provides a set of standard diagrams for graphically depicting OOP systems.
What are Unified Modeling Language (UML) diagrams.
What is displayed in the following code:
string word = "programming";cout << word.substr(3, 4);
What is gram.
Which is NOT a valid C++ exception handling mechanism?
a) try b) catch c) throw d) finally
What is finally?
How C++ passes arrays
What is by Reference.
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.
The term which refers to an object's ability to take different forms.
What is Polymorphism.
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.
The two types of scope in C++
What is Local and Global Scope
What does the name of an array represent in C++?
What is the memory address of the first element
A ______ pointer is a pointer that refers to a memory location which has be freed or no longer valid.
What is dangling?
------------------------
--- DAILY DOUBLE ---
------------------------
What a subclass is also known as.
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)
The definition of a static variable.
What is a local variable that retains its value across function calls.
This member function will add an element to a vector
What is push_back()
In C language programmers use malloc() and free() for memory management. What do C++ programmers use?
What is new and delete?
A member function that returns a value from a class's attribute but does not change it.
What is an accessor.
A statement to change an integer to string in C++.
What is to_string() or string Stream or sprintf().
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.
What member function of vectors will give you the number of elements of a vector?
What is size().
The three types of pointers identified by the textbook.
What are unique_ptr, shared_ptr, and weak_ptr.
What a line with an open arrowhead in an UML diagram from a subclass to the base class represents.
What is inheirtance.