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.7/5
(75)

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

(True/False)
4.8/5
(71)

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

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

(True/False)
4.8/5
(93)

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

(Multiple Choice)
4.9/5
(94)

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

(Multiple Choice)
4.7/5
(78)

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.7/5
(78)

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

(True/False)
4.9/5
(88)

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

(True/False)
4.8/5
(81)

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

(Multiple Choice)
5.0/5
(85)

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

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

(Multiple Choice)
4.7/5
(79)

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

(Multiple Choice)
4.9/5
(76)

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

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

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

(Multiple Choice)
4.8/5
(75)

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.9/5
(82)

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

(Multiple Choice)
4.8/5
(72)

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

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

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

Filters

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