8th Class Computers Science Sample Paper Computer Science Olympiad Model Test Paper-5

  • question_answer
    Given below the two statements. Which of the following statements is/are correct? David is working on a loop that will print number 1 to 5. He is debating between the following two program statement setups:
    Statement A:
    \[i=1\]
    Do While\[i=\,\,<5\]
    Print (i, 1) = i
    i = i + 1
    Loop
    Statement B:
    For \[i=1\] to 5
    Print (i, 1) = i
    Next i

    A)  Statement A is correct

    B)  Statement B is correct

    C)  Both statement A and B are correct

    D)  Neither statement A nor statement B is correct

    E)  None of these

    Correct Answer: A


You need to login to perform this action.
You will be redirected in 3 sec spinner