Exam 10: Characters, C++-Strings, and More About the String Class

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

With pointer variables, you can __________ manipulate data stored in other variables.

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

C

What will the following code output? int number = 22; Int *var = &number; Cout << var << endl;

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

A

What will the following code output? int *numbers = new int[5]; For (int i = 0; i <= 4; i++) *(numbers + i) = i; Cout << numbers[2] << endl;

Free
(Multiple Choice)
4.7/5
(32)
Correct Answer:
Verified

D

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

(Multiple Choice)
4.8/5
(35)

An array name is a pointer constant because the address stored in it cannot be changed during runtime.

(True/False)
4.8/5
(35)

Use the delete operator only on pointers that were

(Multiple Choice)
4.7/5
(32)

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

(Multiple Choice)
4.8/5
(39)

A pointer with the value 0 (zero) is called a NULL pointer.

(True/False)
4.8/5
(40)

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

(Multiple Choice)
4.9/5
(44)

Look at the following statement. int *ptr; In this statement, what does the word int mean?

(Multiple Choice)
4.8/5
(40)

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

(Multiple Choice)
4.8/5
(32)

The statement int *ptr = new int;

(Multiple Choice)
4.8/5
(32)

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

(Multiple Choice)
4.8/5
(35)

Which statement displays the address of the variable num1?

(Multiple Choice)
4.8/5
(38)

The ______ and _______ operators can be used to increment or decrement a pointer variable.

(Multiple Choice)
4.8/5
(36)

With pointer variables you can access, but you cannot modify, data in other variables.

(True/False)
4.8/5
(46)

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

(Multiple Choice)
4.8/5
(37)

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

(True/False)
4.7/5
(36)

What will the following statement output? cout << &num1;

(Multiple Choice)
4.8/5
(34)

The statement int *ptr; Has the same meaning as

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

Filters

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