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
A
You might also like to view...
A network technician recently replaced a managed switch in an enterprise network with a new managed switch. Users on the switch can communicate with each other but now cannot access other network segments. Which of the following is the MOST likely reason that the users are unable to access any network segments?
A. The newly installed switch is defective and must be returned. B. The newly installed switch is using a different MAC address than the previous switch. C. The technician forgot to change the VTP mode on the new switch to server. D. The technician did not use the correct cable when trunking the new switch.
Answer the following statements true (T) or false (F)
1) Every if statement requires an associated else statement, but not every else statement requires an associated if statement. 2) In a nested if statement an else clause is matched to the closest unmatched if. 3) In Java, a boolean expression is limited to having exactly 2 logical operators. 4) A do statement should be used to avoid creating an infinite loop. 5) A while statement always executes its loop body at least once.