Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the String Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
The ____________________ of a base class automatically makes the destructor of a derived class virtual.
(Short Answer)
4.9/5
(46)
In ____ binding, the necessary code to call a specific function is generated by the compiler.
(Multiple Choice)
4.7/5
(45)
The C++ operator ____ is used to destroy dynamic variables.
(Multiple Choice)
4.8/5
(38)
A pointer variable is a variable whose content is a memory address.
(True/False)
4.9/5
(30)
The dereferencing operator is also known as the indirection operator and refers to the object to which its operand points.
(True/False)
4.8/5
(42)
Which of the following operations is allowed on pointer variables?
(Multiple Choice)
4.7/5
(39)
Consider the following statements:
int x;
int &y = x;
The second statement declares y to be a(n) ____________________ of x.
(Short Answer)
4.8/5
(51)
In C++, virtual functions are declared using the reserved word ____.
(Multiple Choice)
4.8/5
(38)
An object of the base class type cannot be passed to a(n) ____________________ parameter of the derived class type.
(Short Answer)
4.9/5
(37)
The statement int *p; is equivalent to int * p;, which is also equivalent to the statement ____________________.
(Short Answer)
4.8/5
(40)
Which of the following would be appropriate syntax for the heading of a copy constructor for a class called rulerType?
(Multiple Choice)
4.7/5
(34)
Consider the following statements:
void pointerParameters(int* &p, double *q)
{
.
.
.
}
In the function pointerParameters, the parameter q is a(n) ____________________ parameter.
(Short Answer)
4.7/5
(34)
The ____ operator can be used to return the address of a private data member of a class.
(Multiple Choice)
4.8/5
(37)
The copy constructor automatically executes when the return value of a function is a(n) ____________________.
(Short Answer)
4.8/5
(38)
The statement that declares board to be an array of six pointers wherein each pointer is of type int is: int ____________________;
(Short Answer)
4.9/5
(40)
Variables that are created during program execution are called static variables.
(True/False)
4.9/5
(38)
What is the value of x after the following statements execute? int x = 25;
Int *p;
P = &x;
*p = 46;
(Multiple Choice)
4.9/5
(37)
For classes with pointer member variables, you should include the copy constructor and the ____________________ in the class.
(Short Answer)
4.9/5
(35)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)