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

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

In C++, the dot operator has a lower precedence than the dereferencing operator.

(True/False)
4.8/5
(41)

A memory leak is an unused memory space that cannot be allocated.

(True/False)
4.8/5
(29)

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

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

(True/False)
4.8/5
(42)

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

(Multiple Choice)
4.9/5
(45)

The ____ constructor is executed when an object is declared and initialized by using the value of another object.

(Multiple Choice)
4.7/5
(38)

Consider the following statements:The code above is an example of a(n) ____________________ class definition. Consider the following statements:The code above is an example of a(n) ____________________ class definition.

(Short Answer)
4.8/5
(39)

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

(True/False)
4.9/5
(37)

In the statement int* p, q; p and q are pointer variables.

(True/False)
4.8/5
(44)

In a ____ copy, two or more pointers of the same type point to the same memory.

(Multiple Choice)
5.0/5
(47)

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

What is the output of the following code? What is the output of the following code?

(Multiple Choice)
4.7/5
(34)

Which of the following can be used to initialize a pointer variable?

(Multiple Choice)
4.9/5
(36)

What is the value of x after the following statements execute? What is the value of x after the following statements execute?

(Multiple Choice)
4.9/5
(47)

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

What is the output of the following statements? What is the output of the following statements?

(Multiple Choice)
4.8/5
(38)

Given the declaration int *p; The statement p = new int[50]; dynamically allocates an array of 50 components of type int and p contains the base address of the array.

(True/False)
4.8/5
(35)

A class ____ automatically executes whenever a class object goes out of scope.

(Multiple Choice)
4.7/5
(33)

The statement that declares board to be an array of six pointers wherein each pointer is of type int is: int ____________________;

(Short Answer)
4.8/5
(40)

In C++, virtual functions are declared using the reserved word ____.

(Multiple Choice)
5.0/5
(38)
Showing 21 - 40 of 44
close modal

Filters

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