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

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

What is the value of x after the following statements execute? int x = 25; Int *p; P = &x; *p = 46;

(Multiple Choice)
4.7/5
(83)

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
(87)

A list is a collection of elements of the same type.

(True/False)
4.8/5
(66)

Which of the following arithmetic operations is allowed on pointer variables?

(Multiple Choice)
4.9/5
(80)

An array created during the execution of a program is called a(n)____ array.

(Multiple Choice)
4.8/5
(82)

Variables that are created during program execution are called static variables.

(True/False)
4.7/5
(75)

The C++ operator ____ is used to destroy dynamic variables.

(Multiple Choice)
4.9/5
(73)

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
(81)

The statement int *p; is equivalent to int * p;,which is also equivalent to the statement ____________________.

(Short Answer)
4.9/5
(77)

An object of the base class type cannot be passed to a(n)____________________ parameter of the derived class type.

(Short Answer)
4.9/5
(83)

The copy constructor automatically executes when,as a parameter,an object is passed by ____________________.

(Short Answer)
4.9/5
(72)

Given the statement double *p;,the statement p++; will increment the value of p by ____ byte(s).

(Multiple Choice)
4.9/5
(79)

A(n)____ is a collection of distinct elements of the same type.

(Multiple Choice)
4.9/5
(78)

The statement that declares board to be a pointer to a pointer is: int ____________________;

(Short Answer)
4.9/5
(94)

For classes with pointer member variables,you should include the copy constructor and the ____________________ in the class.

(Short Answer)
4.9/5
(83)

Given the declaration int *a;,the statement a = new int[50]; dynamically allocates an array of 50 components of the type ____.

(Multiple Choice)
4.9/5
(62)

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
(83)

In C++,pointer variables are declared using the reserved word pointer.

(True/False)
4.9/5
(72)

Run-time binding is also known as ____ binding.

(Multiple Choice)
4.8/5
(75)

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
(68)
Showing 21 - 40 of 50
close modal

Filters

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