Exam 9: Pointers

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

Not all arithmetic operations may be performed on pointers. For example, you cannot ________ or ________ a pointer.

Free
(Multiple Choice)
4.9/5
(46)
Correct Answer:
Verified

A

Assuming ptr is a pointer variable, what will the following statement output? Assuming ptr is a pointer variable, what will the following statement output?

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

A

What will the following code output? What will the following code output?

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

B

Look at the following statement: Look at the following statement:   In this statement, what does the word int mean? In this statement, what does the word int mean?

(Multiple Choice)
4.8/5
(42)

Look at the following statement: Look at the following statement:    This statement ________. This statement ________.

(Multiple Choice)
4.8/5
(31)

Assuming myValues is an array of int values, and index is an int variable, both of the following statements do the same thing. cout << myValues[index] << endl; cout << *(myValues + index)<< endl;

(True/False)
4.9/5
(32)

The contents of pointer variables may be changed with mathematical statements that perform ________.

(Multiple Choice)
5.0/5
(37)

C++ does not perform array bounds checking, making it possible for you to assign a pointer the address of an element out of the boundaries of an array.

(True/False)
4.8/5
(39)

What will the following code output? What will the following code output?

(Multiple Choice)
4.8/5
(38)

Which statement displays the address of the variable num1?

(Multiple Choice)
4.8/5
(45)

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

(Multiple Choice)
4.8/5
(35)

Every byte in the computer's memory is assigned a unique ________.

(Multiple Choice)
4.9/5
(42)

It is legal to subtract a pointer variable from another pointer variable.

(True/False)
4.8/5
(39)

What will the following code output? What will the following code output?

(Multiple Choice)
4.9/5
(33)

Look at the following code: Look at the following code:   After this code executes, which of the following statements is true? After this code executes, which of the following statements is true?

(Multiple Choice)
4.8/5
(37)

Which of the following statements deletes memory that has been dynamically allocated for an array?

(Multiple Choice)
4.7/5
(48)

In C++ 11, the ________ key word was introduced to represent the address 0.

(Multiple Choice)
4.8/5
(32)

If you are using an older compiler that does not support the C++ 11 standard, you should initialize pointers with ________.

(Multiple Choice)
4.7/5
(34)

To use any of the smart pointers in C++ 11, you must #include the memory header file with the following directive: #include <memory>

(True/False)
4.7/5
(31)

The following statement: The following statement:

(Multiple Choice)
4.8/5
(42)
Showing 1 - 20 of 45
close modal

Filters

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