Exam 10: Pointers

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

Which of the following statements correctly deletes a dynamically-allocated array pointed to by p?

(Multiple Choice)
4.9/5
(37)

The statement cin >> *p;

(Multiple Choice)
4.9/5
(39)

The statement shared_ptr<int> p(new int); involves

(Multiple Choice)
5.0/5
(34)

The expression s->m is meaningful only when s is a pointer to a structure and m is a member of the structure.

(True/False)
4.7/5
(39)

A temporary value in a program can be referred to by at most one lvalue reference.

(True/False)
4.7/5
(32)

The set of operations supported by the unique_ptr class include

(Multiple Choice)
4.8/5
(29)

The term pointer can be used interchangeably with

(Multiple Choice)
4.9/5
(33)

When you work with a dereferenced pointer, you are actually working with

(Multiple Choice)
4.8/5
(35)

Assuming that arr is an array identifier, the statement sum += *arr;

(Multiple Choice)
4.9/5
(38)

When the less than ( < ) operator is used between two pointer variables, the expression is testing whether

(Multiple Choice)
5.0/5
(36)

The ________ and ________ operators can respectively be used to increment and decrement a pointer variable.

(Multiple Choice)
4.9/5
(31)

The statement Rectangle * boxPtr; defines a variable boxPtr to be a pointer pointing to a type Rectangle.

(True/False)
5.0/5
(15)

When the ________ is placed in front of a variable name, it returns the address of that variable.

(Multiple Choice)
4.9/5
(31)

Which of the following statements is not valid C++ code?

(Multiple Choice)
4.8/5
(31)

The ________, also known as the address operator, returns the memory address of a variable.

(Multiple Choice)
4.9/5
(40)

The statement cout << &num1; will output

(Multiple Choice)
5.0/5
(32)

If a variable occupies more than one byte of memory, its address is

(Multiple Choice)
4.9/5
(40)

Dynamic memory allocation occurs

(Multiple Choice)
4.8/5
(39)

It is possible for a structure to contain as a member a pointer to its own structure type.

(True/False)
4.9/5
(33)

The delete operator should only be used on pointers that

(Multiple Choice)
4.8/5
(35)
Showing 21 - 40 of 62
close modal

Filters

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