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

A

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

Free
(Multiple Choice)
4.9/5
(76)
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
(80)

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

(Multiple Choice)
4.9/5
(68)

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

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

(Multiple Choice)
5.0/5
(72)

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

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

(Multiple Choice)
4.8/5
(83)

Which statement displays the address of the variable num1?

(Multiple Choice)
4.8/5
(81)

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

(Multiple Choice)
4.8/5
(79)

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

(Multiple Choice)
5.0/5
(85)

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

(True/False)
4.8/5
(80)

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

(Multiple Choice)
4.9/5
(66)

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

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

(Multiple Choice)
4.7/5
(87)

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

(Multiple Choice)
4.8/5
(74)

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

(Multiple Choice)
4.8/5
(73)

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

The following statement: The following statement:

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

Filters

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