11/03/2012

BCS2233 QUIZ 2 (CHAPTER 4 LOOPS)


QUIZ 2 (CHAPTER 4 LOOPS)
Name:_______________
Matric:______________

Please submit before 5:00 pm 4/11/12.

SECTION A

  • 1. There are three types of control statements: sequence, selection, and repetition. (T/F)

    2.There are three types of repetition statements: the while loop, the do-while loop, and the for loop.(T/F)


  • 3. In while loop, if the condition is false, the loop body is executed; if it is true, the loop terminates. (T/F)


    4. The do-while loop is similar to the while loop, except that the do-while loop executes the loop body first and then checks the loop-continuation-condition to decide whether to continue or to terminate.(T/F)


  • 5.The while loop and the do-while loop are often used when the number of repetitions is unspecified.(T/F)


    6. The for loop control has two parts. The first part is an initial action that often initializes a control variable. The second part, the loop-continuation-condition, determines whether the loop body is to be executed. (T/F)


  • 7. The for loop is generally used to execute a loop body a predictable number of times; (T/F)

    SECTION B


No comments:

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...