- Information
- AI Chat
Was this document helpful?
Drake 5e Test Bank Ch06
Course: Intro to C Programming (EECT 128)
3 Documents
Students shared 3 documents in this course
University: Ivy Tech Community College of Indiana
Was this document helpful?
Prelude to Programming Test Bank Chapter 6
Test Bank for Prelude to Programming Chapter 6
MULTIPLE CHOICE
1. A list of related data of the same data type which is referred to by a single variable name with
an index number to identify each item is a(n):
a. list
b. database
c. array
d. element
ANS: C
2. The fourth element of an array named Colors is identified as:
a. Colors[0]
b. Colors[3]
c. Colors[4]
d. Colors[5]
ANS: B
3. Which is the correct way to load an array named WorkHours with the number of hours that
five employees worked last week?
a. Declare WorkHours[5] As Float
Declare J As Integer
For (J = 0; J<=4; J++)
Write “Input number hours worked for employee” + J+1
Input WorkHours[J]
End For
b. Declare WorkHours[4] As Float
Declare J As Integer
For (J = 0; J<=4; J++)
Write “Input number hours worked for employee” + J+1
Input WorkHours[J+1]
End For
c. Declare WorkHours[5] As Float
Declare J As Integer
For (J = 0; J<=5; J++)
Write “Input number hours worked for employee” + J
Input WorkHours[J+1]
End For
d. None of these are correct
ANS: A
© 2011 Pearson Education 1