CPT168Chap8

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

What is the subscript for the data value 92 in the example given below? Declare Integer score [5] = 83, 92, 78, 94, 71 a. One b. Two c. A d. B e. None of the above

a. One

Two- dimensional arrays can be thought of as containing ___________. a. Rows and columns b. Lines and pages c. Rows and pages d. Lines and columns e. Rows and pages

a. Rows and columns

Which is the simplest search technique to use to find an item in an array? a. Sequential b. Binary c. Bubble d. Select e. None of the above

a. Sequential

When working with arrays most programming languages perform ____________, which meansthey do not allow programs to use invalid subscripts. a. array bounds checking b. buffer overrun protection c. bitwise data execution d. subscript binding e. None of these

a. array bounds checking

Every element in an array is assigned a unique number known as a ______________. a. subscript b. integer c. character d. number e. None of the above

a. subscript

Which of the following array declarations would be best suited for storing the retail prices? a. Declare String retailPrice[SIZE] b. Declare Real retailPrice[SIZE] c. Declare Integer retailPrice[SIZE] d. All of the above e. None of the above

b. Declare Real retailPrice[SIZE]

Some programming languages provide this specialized loop that steps through an array,retrieving the value of each element. a. While Each b. For Each c. Repeat Get d. Step Loop e. None of the above

b. For Each

What type of error occurs when a loop iterates one time too few or one time too many? a. Run time error b. Off-by-one error c. Validation error d. Syntax error e. All of the above

b. Off-by-one error

What is the term used for the number inside the bracket that specifies the number of values thatan array can hold? a. Size b. Size declarator c. Number d. Number declarator e. None of the above

b. Size declarator

How many subscripts do you need to access one element in a two-dimensional array? a. One b. Two c. Three d. Four e. None of the above

b. Two

What is the term used for the value that is searched for in a search algorithm? a. stringValue b. searchValue c. matchValue d. flag e. None of the above

b. searchValue

Processing a large number of items in a(n) ________ is usually easier than processing a largenumber of items stored in separate variables. a. Constant b. Variable c. Array d. Loop e. None of the above

c. Array

In the following declaration, what is the data type of the elements of the array?Declare Integer numbers [SIZE] a. SIZE b. numbers c. Integer d. Declare e. None of the above

c. Integer

________________ arrays are two or more arrays that hold related data, and the elements areaccessed using a common subscript. a. Sequential b. Binary c. Parallel d. Linear e. None of the above

c. Parallel

The expression score[5] is pronounced _____________________. a. Score of 5 b. Score 5 c. Score sub 5 d. Score of 4 e. Score sub 4

c. Score sub 5

A partially filled array is normally used with __________. a. a library function that performs array insertions b. an accompanying variable that holds a copy of the last item stored in the array c. an accompanying integer variable that holds the number of items that are actuallystored in the array d. a warning to the user that some of the elements contain invalid values e. None of the above

c. an accompanying integer variable that holds the number of items that are actuallystored in the array

Which of the following arguments must be passed when passing an array as an argument? a. The array itself b. An integer that specifies the number of elements in the array c. The data type of the array d. A and B e. A and C

d. A and B

A three-dimensional array can be thought of as ______ of two-dimensional arrays. a. Rows b. Columns c. Lines d. Pages e. None of the above

d. Pages

Access the individual elements in an array by using their _____________. a. Sizes b. Numbers c. Integers d. Subscripts e. None of the above

d. Subscripts

Which of the following statement is true about the statement below? Declare Integer score [5] = 83, 92, 78, 94, 71 a. This is an array declaration. b. This is an array initialization. c. This is an array size establishment. d. This is an array declaration and initialization. e. This is an array declaration and size establishment

d. This is an array declaration and initialization.


संबंधित स्टडी सेट्स

Econ 315 Practice Quiz 4 - CH 10 and 11

View Set

Carbon Atom (Nucleus and Electrons)

View Set