Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 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 (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
What is the value of x after the following statements execute? int x = 25;
Int *p;
P = &x;
*p = 46;
(Multiple Choice)
4.8/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)
Which of the following arithmetic operations is allowed on pointer variables?
(Multiple Choice)
4.9/5
(34)
An array created during the execution of a program is called a(n)____ array.
(Multiple Choice)
4.8/5
(39)
Variables that are created during program execution are called static variables.
(True/False)
4.8/5
(35)
The C++ operator ____ is used to destroy dynamic variables.
(Multiple Choice)
4.9/5
(35)
Consider the following statement: ptrMemberVarType objectThree(objectOne);
The values of the member variables of objectOne are being copied into the corresponding member variables of objectThree.This initialization is called the ____.
(Multiple Choice)
4.8/5
(43)
The statement int *p; is equivalent to int * p;,which is also equivalent to the statement ____________________.
(Short Answer)
4.9/5
(39)
An object of the base class type cannot be passed to a(n)____________________ parameter of the derived class type.
(Short Answer)
4.8/5
(37)
The copy constructor automatically executes when,as a parameter,an object is passed by ____________________.
(Short Answer)
5.0/5
(38)
Given the statement double *p;,the statement p++; will increment the value of p by ____ byte(s).
(Multiple Choice)
4.9/5
(40)
A(n)____ is a collection of distinct elements of the same type.
(Multiple Choice)
4.9/5
(38)
The statement that declares board to be a pointer to a pointer is: int ____________________;
(Short Answer)
4.9/5
(42)
For classes with pointer member variables,you should include the copy constructor and the ____________________ in the class.
(Short Answer)
4.9/5
(43)
Given the declaration int *a;,the statement a = new int[50]; dynamically allocates an array of 50 components of the type ____.
(Multiple Choice)
4.8/5
(30)
Consider the following declaration of a struct:
struct studentType
{
char name[26];
double gpa;
int sID;
char grade;
};
studentType student;
studentType *studentPtr;
The statement (*studentPtr).gpa = 2.5; is equivalent to ____________________ = 2.5;.
(Short Answer)
4.8/5
(44)
In C++,pointer variables are declared using the reserved word pointer.
(True/False)
4.8/5
(30)
Which of the following would be appropriate syntax for the heading of a copy constructor for a class called rulerType?
(Multiple Choice)
4.8/5
(36)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)