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
(80)
Correct Answer:
Verified

C

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

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

value

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

Free
(True/False)
4.8/5
(84)
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
(83)

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

(Multiple Choice)
4.9/5
(78)

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

(Multiple Choice)
4.9/5
(73)

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

(True/False)
4.9/5
(72)

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

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

(Multiple Choice)
4.9/5
(70)

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

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

(Multiple Choice)
4.9/5
(84)

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

(Multiple Choice)
4.9/5
(79)

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

(True/False)
4.8/5
(81)

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

(Multiple Choice)
4.8/5
(79)

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

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

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

(Multiple Choice)
4.9/5
(90)

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

(Multiple Choice)
4.9/5
(83)

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

(Multiple Choice)
4.8/5
(83)

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

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

Filters

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