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

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

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

Filters

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