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
If p is a pointer variable, the statement p = p + 1; is valid in C++.
(True/False)
4.8/5
(38)
In C++, you declare a pointer variable by using the ____ symbol.
(Multiple Choice)
4.7/5
(40)
What is the output of the following code? int *p;
int x;
x = 76;
p = &x;
*p = 43;
Cout << x << ", " << *p << endl;
(Multiple Choice)
4.8/5
(41)
The ____ constructor is executed when an object is declared and initialized by using the value of another object.
(Multiple Choice)
4.8/5
(36)
Given the statement double *p;, the statement p++; will increment the value of p by ____ byte(s).
(Multiple Choice)
4.8/5
(39)
What is the output of the following statements? int x = 33;
int *q;
q = &x;
cout << *q << endl;
(Multiple Choice)
4.8/5
(27)
Once a class contains one or more pure virtual functions, then that class is called a(n) ____________________ class.
(Short Answer)
4.9/5
(46)
In C++, the dot operator has a lower precedence than the dereferencing operator.
(True/False)
4.8/5
(43)
What is the output of the following code? int *p;
Int x;
x = 12;
p = &x;
cout << x << ", ";
*p = 81;
cout << *p << endl;
(Multiple Choice)
4.8/5
(34)
Consider the following statements:
class shape
{
public:
virtual void draw() = 0;
virtual void move(double x, double y) = 0;
.
.
.
};
The code above is an example of a(n) ____________________ class definition.
(Short Answer)
4.9/5
(35)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)