Exam 14: More About Classes
Exam 1: Introduction to Computers and Programming47 Questions
Exam 2: Introduction to C62 Questions
Exam 3: Expressions and Interactivity45 Questions
Exam 4: Making Decisions51 Questions
Exam 5: Loops and Files60 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays and Vectors56 Questions
Exam 8: Searching and Sorting Arrays30 Questions
Exam 9: Pointers47 Questions
Exam 10: Characters, C-Strings, and More About the String Class47 Questions
Exam 11: Structured Data46 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes54 Questions
Exam 14: More About Classes46 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions43 Questions
Exam 16: Exceptions and Templates36 Questions
Exam 17: The Standard Template Library38 Questions
Exam 18: Linked Lists41 Questions
Exam 19: Stacks and Queues47 Questions
Exam 20: Recursion27 Questions
Exam 21: Binary Trees39 Questions
Select questions type
To overload the + operator, you would write a function named
Free
(Multiple Choice)
4.8/5
(31)
Correct Answer:
B
A non-static member function may not access a static member variable.
Free
(True/False)
4.9/5
(36)
Correct Answer:
False
It is possible to declare an entire class as a friend of another class.
Free
(True/False)
4.9/5
(36)
Correct Answer:
True
A static member function does not need to be called by a specific object of the class.
(True/False)
4.8/5
(27)
When a class declares an entire class as its friend, the friendship status is reciprocal. That is, each class's member functions have free access to the other's private members.
(True/False)
4.9/5
(35)
When you redefine the way a standard operator works when it is used with class objects, you have __________ the operator.
(Multiple Choice)
4.9/5
(36)
A move operation transfers resources from a source object to a target object.
(True/False)
4.9/5
(39)
A public data member may be declared a friend of a private function.
(True/False)
4.9/5
(37)
A(n) __________ is a special function that is called whenever a new object is created and initialized with another object's data.
(Multiple Choice)
4.8/5
(32)
In C++11 an rvalue reference is a reference variable that can refer only to temporary objects.
(True/False)
4.7/5
(37)
Select all that apply. Given the following code fragment, which of the things shown below happen when the statement on line 8 executes?
1 int square(int a)
2 {
3 return a * a;
4 }
5 int main()
6 {
7 int x = 0;
8 x = square(5);
9 cout << x << endl;
10 return 0;
11 }
(Multiple Choice)
4.9/5
(33)
An ___________ operator can work with programmer-defined data types.
(Multiple Choice)
4.9/5
(32)
A static member variable can be used when there are no objects of the class in existence.
(True/False)
4.7/5
(48)
The this pointer is a special built-in pointer that is automatically passed as a hidden argument to all non-static member functions.
(True/False)
4.8/5
(29)
Which type of function is not a member of a class but has access to the private members of the class?
(Multiple Choice)
5.0/5
(33)
A(n) __________ informs the compiler that a class will be declared later in the program.
(Multiple Choice)
4.9/5
(29)
A member function that is declared __________ may not access any non-static data members in the class.
(Multiple Choice)
4.7/5
(37)
If you do not furnish a __________, a default one will be provided by the compiler.
(Multiple Choice)
4.8/5
(30)
In C++11 reference variables that can refer only to temporary objects that would otherwise have no name are called __________ and are declared with a __________.
(Multiple Choice)
4.8/5
(34)
Showing 1 - 20 of 46
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)