Exam 5: Understanding Arrays, Strings and Pointers

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

How can you copy the contents of one C-style string to another string in C++?

(Essay)
4.8/5
(41)

Write a C++ statement that prints how much memory an integer uses.

(Essay)
5.0/5
(37)
Match each term with the correct statement below.
Premises:
array whose elements are accessed using a single subscript
Responses:
array
memory address
flag variable
Correct Answer:
Verified
Premises:
Responses:
array whose elements are accessed using a single subscript
array
(Matching)
4.9/5
(45)
Match each term with the correct statement below.
Premises:
number that indicates the position of the particular array element being used
Responses:
memory address
one-dimensional array
subscript
Correct Answer:
Verified
Premises:
Responses:
number that indicates the position of the particular array element being used
memory address
(Matching)
5.0/5
(42)

How can you create a string variable in C++?

(Essay)
4.9/5
(36)

Which of the following statements produces the same output as cout ? Assume someNumbers is an array of integers.

(Essay)
4.9/5
(45)

Flag variables are usually bool type or ____ type.

(Multiple Choice)
4.7/5
(37)

To compare the contents of two string objects you can use the ____.

(Multiple Choice)
4.9/5
(38)

When you assign one pointer to another, you are not making a copy of the data; instead, you are setting two pointers to point to the same memory location.

(True/False)
4.9/5
(27)

What happens if a subscript exceeds the size of an array?

(Essay)
4.8/5
(43)
Match each term with the correct statement below.
Premises:
occurs when a pointer is left pointing to garbage
Responses:
hexadecimal
subscript
two-dimensional array
Correct Answer:
Verified
Premises:
Responses:
occurs when a pointer is left pointing to garbage
hexadecimal
(Matching)
4.8/5
(30)

In C++, you are required to assign array values to elements in sequential order.

(True/False)
4.9/5
(30)

When you declare an array, the size must be a(n) ____________________.

(Short Answer)
4.9/5
(38)

An array name actually represents a(n) ____________________.

(Short Answer)
4.9/5
(39)

An alternative to parallel arrays is to create ____.

(Multiple Choice)
4.9/5
(42)

An array subscript must always be an integer.

(True/False)
4.9/5
(39)

Describe the various ways to place an asterisk when declaring an integer pointer.

(Essay)
4.8/5
(40)

How is the null character represented in C++?

(Essay)
4.8/5
(39)

How do you declare an array in C++?

(Essay)
4.9/5
(35)
Match each term with the correct statement below.
Premises:
you use it to mark an occurrence
Responses:
element
array
memory address
Correct Answer:
Verified
Premises:
Responses:
you use it to mark an occurrence
element
(Matching)
4.8/5
(35)
Showing 21 - 40 of 55
close modal

Filters

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