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

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

Which of the following operations is allowed on pointer variables?

Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
Verified

C

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

Free
(Short Answer)
4.8/5
(26)
Correct Answer:
Verified

value

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

Free
(True/False)
4.8/5
(41)
Correct Answer:
Verified

False

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

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

(Multiple Choice)
4.9/5
(38)

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

(Multiple Choice)
4.9/5
(38)

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

(True/False)
4.9/5
(33)

Which of the following would be appropriate syntax for the heading of a copy constructor for a class called rulerType?

(Multiple Choice)
4.9/5
(39)

In ____ binding, the necessary code to call a specific function is generated by the compiler.

(Multiple Choice)
4.8/5
(34)

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

(Multiple Choice)
4.7/5
(39)

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

(Multiple Choice)
4.9/5
(41)

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

(Multiple Choice)
4.9/5
(33)

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

(True/False)
4.8/5
(30)

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

(Multiple Choice)
4.8/5
(41)

Consider the following statements: In the function pointerParameters, the parameter p is a(n) ____________________ parameter. Consider the following statements: In the function pointerParameters, the parameter p is a(n) ____________________ parameter.

(Short Answer)
4.8/5
(29)

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

In a ____ copy, two or more pointers have their own data.

(Multiple Choice)
4.9/5
(45)

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

(Multiple Choice)
4.9/5
(41)

The ____ operator can be used to return the address of a private data member of a class.

(Multiple Choice)
4.9/5
(42)

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

(Multiple Choice)
4.8/5
(38)
Showing 1 - 20 of 43
close modal

Filters

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