Java Ch 5 Quiz

9 Questions | Attempts: 268
Share

SettingsSettingsSettings
Java Quizzes & Trivia

Questions and Answers
  • 1. 
    True or False: A loop is a control-structure used for repetition of certain statements.
    • A. 

      True

    • B. 

      False

  • 2. 
    True or False: The statements found within a while loop always execute.
    • A. 

      True

    • B. 

      False

  • 3. 
    True or False: A flag-controlled while loop uses a Boolean variable to control the loop.
    • A. 

      True

    • B. 

      False

  • 4. 
    A loop that continues to execute endlessly is called a(n) ____ loop
  • 5. 
    If the first two numbers of a Fibonacci sequence are 1 and 1 what is the seventh Fibonacci number?
  • 6. 
    True or False: Any for loop can be written as a while loop.
    • A. 

      True

    • B. 

      False

  • 7. 
    If the loop condition is initially ____, the loop body does not execute.
    • A. 

      True

    • B. 

      False

  • 8. 
    True or False: The statements in the body of a do…while loop execute at least once.
    • A. 

      True

    • B. 

      False

  • 9. 
    do…while loops are called ____ loops because the condition is evaluated after the body of the loop is executed.
Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.