Exam 6: Arrays

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

Match each term with a statement below. -Starts searching through a list from one end to the other

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

A

A(n)____________________ is a variable set to indicate whether some event has occurred.

Free
(Short Answer)
4.8/5
(97)
Correct Answer:
Verified

flag

How do you reference the elements in an array?

Free
(Essay)
4.8/5
(84)
Correct Answer:
Verified

Each array element is differentiated from the others with a unique subscript,also called an index,which is a number that indicates the position of a particular item within an array.All array elements have the same group name,but each individual element also has a unique subscript indicating how far away it is from the first element.For example,a five-element array uses subscripts 0 through 4,and a ten-element array uses subscripts 0 through 9.In all languages,subscript values must be sequential integers (whole numbers).
To use an array element,you place its subscript within square brackets or parentheses (depending on the programming language)after the group name.

When you search through a list from one end to the other,you are performing a ____.

(Multiple Choice)
4.8/5
(82)

All array elements have the same ____________________ name,but each individual element also has a unique subscript indicating how far away it is from the first element.

(Short Answer)
4.8/5
(62)

A subscript,also called a(n)____________________,is a number that indicates the position of a particular item within an array.

(Short Answer)
4.9/5
(71)

Suppose that you have declared a numeric array named numbers,and two of its elements are numbers[1] and numbers[5].You know that ____.

(Multiple Choice)
5.0/5
(84)

Describe an array and provide an example of a real-life equivalent to an array.

(Essay)
4.7/5
(87)

Many newer programming languages such as C++,Java,and C# use the square bracket notation for arrays.

(True/False)
4.9/5
(79)

In all languages,subscript values must be sequential ____.

(Multiple Choice)
5.0/5
(83)

The number of bytes in an array is always a multiple of the number of ____ in an array.

(Multiple Choice)
4.8/5
(71)

A(n)____ is another name for a subscript.

(Multiple Choice)
4.8/5
(75)

Match each term with a statement below. -A variable that you set to indicate whether some event has occurred

(Multiple Choice)
4.9/5
(81)

Match each term with a statement below. -In this type of array,each element in one array is associated with the element in the same relative position in the other array

(Multiple Choice)
4.9/5
(86)

A ____ relates parallel arrays.

(Multiple Choice)
4.7/5
(72)

What is an advantage of using an array to match a value in a range of values?

(Essay)
4.9/5
(82)

If you declare a variable to be Boolean,you can set its value to ____.

(Multiple Choice)
4.8/5
(82)

An array is a(n)____ of values in computer memory.

(Multiple Choice)
4.8/5
(76)

Consider a mail-order business in which customers get a discount based on the quantity they order.In writing a program to compute the discount based on a customer's order quantity,why is it not a good idea to construct an array with as many elements as a customer might want to order,and store the appropriate discount associated with each number?

(Essay)
4.9/5
(81)

Besides making your code easier to modify,using a ____ makes the code easier to understand.

(Multiple Choice)
4.8/5
(77)
Showing 1 - 20 of 60
close modal

Filters

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