What is the precondition of the following algorithm?Algorithm fillQueues (q0to9, q10to19, q20to29, qOver29)This algorithm reads data from the keyboard and places them in one of four queues).Post queues filled with data1 loop (not end of data)   1 read (number)   2 if (number < 10)      1 enqueue (q0to9, number)   3 elseif (number < 20)      1 enqueue (q10to19, number)   4 elseif (number < 30)      1 enqueue (q20to29, number)   5 else      1 enqueue (qOver29, number)   6 end if2 end loopend fillQueues

A. all four queues have been created
B. none of the queues have been created
C. none of the queues is empty
D. q0to9 is empty


Answer: A

Computer Science & Information Technology

You might also like to view...

Ethan is working with desktop video. Ethan knows that linear video editing ____.

A. requires at least 1 GB of RAM B. moves footage from one videotape to another C. requires a computer with video editing software D. uses a random-access device to easily edit and arrange video clips

Computer Science & Information Technology

Selecting the ____ means selecting everything in the image outside of the current selection.

A. reverse B. obverse C. adverse D. inverse

Computer Science & Information Technology

Which of the following statements about the break statement is false?

a. The break statement is used to exit an iteration structure early and continue execution after the loop. b. A break statement can only break out of an immediately enclosing while, for, do…while or switch statement. c. The break statement, when executed in a while, for or do…while, skips the remaining statements in the loop body and proceeds with the next iteration of the loop. d. Common uses of the break statement are to escape early from a loop or to skip the remainder of a switch.

Computer Science & Information Technology

Item 2 in the accompanying figure represents the ____.

A. light point B. current box C. new box D. dark point

Computer Science & Information Technology