Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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)

In C++, ____ is called the address of operator.

(Multiple Choice)
4.9/5
(45)

The code int *p; declares p to be a(n) ____ variable.

(Multiple Choice)
4.8/5
(37)

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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)