Exam 7: Pointers and Pointer-Based Strings

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

A pointer can not be assigned to:

(Multiple Choice)
4.8/5
(39)

Pointers cannot be used to:

(Multiple Choice)
4.9/5
(41)

Which of the following is not a valid way to pass arguments to a function in C++?

(Multiple Choice)
4.8/5
(31)

Consider the following function: Void reverse char *string1, const char *string2 ) { Int stringsize = sizeof string1 )/sizeof char ); * string1 + stringsize -1 ) = '\0'; String1 = string1 + stringsize - 2; For ; *string2 != '\0'; string1--, string2++ ) *string1 = *string2; } What method does the function use to refer to array elements?

(Multiple Choice)
4.8/5
(42)

All of the following can cause a fatal execution-time error except:

(Multiple Choice)
4.9/5
(27)

Given that k is an integer array starting at location 2000, kPtr is a pointer to k and each integer is stored in 4 bytes of memory, what location does kPtr + 3 point to?

(Multiple Choice)
4.9/5
(39)

Three of the following expressions have the same value. Which of the following expressions has a value different from the others'?

(Multiple Choice)
4.9/5
(39)

Comparing pointers and performing pointer arithmetic on them is meaningless unless:

(Multiple Choice)
4.7/5
(31)
Showing 21 - 28 of 28
close modal

Filters

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