Filters
Question type

Study Flashcards

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.

Correct Answer

verifed

verified

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?

Correct Answer

verifed

verified

This approach has at least three drawbac...

View Answer

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

A) True
B) False

Correct Answer

verifed

verified

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


A) standard constant
B) named constant
C) literal constant
D) named variable

E) All of the above
F) C) and D)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

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


A) linear search
B) binary search
C) quadratic search
D) single lookup

E) All of the above
F) A) and D)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

An array is a series or list of variable...

View Answer

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


A) pointer
B) sequence
C) index
D) place holder

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

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


A) linear search
B) in bounds
C) flag
D) parallel arrays
E) array
F) element
G) for loop
H) named constant
I) binary search
J) populating the array

K) C) and H)
L) A) and F)

Correct Answer

verifed

verified

A

A ____ relates parallel arrays.


A) superscript
B) key
C) subscript
D) postscript

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

How do you reference the elements in an array?

Correct Answer

verifed

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.

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


A) list
B) accumulation
C) set
D) record

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

flag

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


A) any number
B) true or false
C) any integer
D) 1 or -1

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

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


A) numbers[1] is smaller than numbers[5]
B) there are exactly four elements between those two elements
C) numbers[5] is the last element in the array
D) there are exactly three elements between those two elements

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

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


A) subscripts
B) elements
C) iterators
D) indexes

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

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

Correct Answer

verifed

verified

When using an array to store range limit...

View Answer

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


A) linear search
B) in bounds
C) flag
D) parallel arrays
E) array
F) element
G) for loop
H) named constant
I) binary search
J) populating the array

K) B) and H)
L) All of the above

Correct Answer

verifed

verified

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


A) linear search
B) in bounds
C) flag
D) parallel arrays
E) array
F) element
G) for loop
H) named constant
I) binary search
J) populating the array

K) A) and C)
L) A) and E)

Correct Answer

verifed

verified

In all languages,subscript values must be sequential ____.


A) characters
B) fractions
C) real numbers
D) integers

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

Showing 1 - 20 of 60

Related Exams

Show Answer