Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
Which of the following operations is allowed on pointer variables?
Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
C
The copy constructor automatically executes when, as a parameter, an object is passed by ____________________.
Free
(Short Answer)
4.8/5
(26)
Correct Answer:
value
Variables that are created during program execution are called static variables.
Free
(True/False)
4.8/5
(41)
Correct Answer:
False
Given the declaration
int *p;
The statement
p = new int[50];
dynamically allocates an array of 50 components of type int and p contains the base address of the array.
(True/False)
4.8/5
(41)
Which of the following would be appropriate syntax for the heading of a copy constructor for a class called rulerType?
(Multiple Choice)
4.9/5
(39)
In ____ binding, the necessary code to call a specific function is generated by the compiler.
(Multiple Choice)
4.8/5
(34)
Given the declaration int *a;, the statement a = new int[50]; dynamically allocates an array of 50 components of the type ____.
(Multiple Choice)
4.7/5
(39)
Which of the following can be used to initialize a pointer variable?
(Multiple Choice)
4.9/5
(33)
In C++, pointer variables are declared using the reserved word pointer.
(True/False)
4.8/5
(30)
Consider the following statements:
In the function pointerParameters, the parameter p is a(n) ____________________ parameter.


(Short Answer)
4.8/5
(29)
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
(34)
In a ____ copy, two or more pointers of the same type point to the same memory.
(Multiple Choice)
4.9/5
(41)
The ____ operator can be used to return the address of a private data member of a class.
(Multiple Choice)
4.9/5
(42)
Showing 1 - 20 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)