Topic 5-2: do while loop

Topic 5-2: do while loop

University

7 Qs

quiz-placeholder

Similar activities

FOP - CHAPTER 6

FOP - CHAPTER 6

University

10 Qs

DECISION MAKING IN C

DECISION MAKING IN C

University

10 Qs

FST Class 2023- Quiz 5

FST Class 2023- Quiz 5

University

9 Qs

Java MCQ Test on Control Statements

Java MCQ Test on Control Statements

University

10 Qs

PYTHON LOOPING

PYTHON LOOPING

University

10 Qs

Arduino Quiz 2

Arduino Quiz 2

University

10 Qs

SLG IPC Week 4

SLG IPC Week 4

University

12 Qs

Understanding Pseudocode Basics

Understanding Pseudocode Basics

6th Grade - University

10 Qs

Topic 5-2: do while loop

Topic 5-2: do while loop

Assessment

Quiz

Computers

University

Hard

Created by

Adila Nordin

Used 12+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is the correct format of a do while loop?

do-while(condition);

{

//statement

}

do{

//statement

}while(condition);

do-while(condition)

{

//statement

}

do{

//statement

}while(condition)

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the main difference between a while and a do while loop in Java? (can select more than 1 answer)

while loop executes the statements inside of it at least once even if the condition is false.

do while loop executes the statements inside of it at least once even if the condition is false.

while loop will not executes the statements inside of it if the condition is false.

do while loop will not executes the statements inside of it if the condition is false.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about do while loop is true?

do while statement is an alternative to multiple if else statement.

do while statement only executes if the condition/expression is false.

do while statement is written as do (condition) while.

do while statement will execute at least once before testing its condition/expression.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a do while loop, the condition is evaluated at the _____ of the statement.

start

end

middle

never

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times a do while loop is guaranteed to loop?

0

1

Infinitely

Can't say, need to check when the condition becomes false.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of the code?

5

5 2

5 2 0

Error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of the code?

11

5

11 16

Error