LOOPING

LOOPING

University

15 Qs

quiz-placeholder

Similar activities

Internet

Internet

University

11 Qs

PSSI Chp 1 dan 2

PSSI Chp 1 dan 2

University

12 Qs

Algo Quiz

Algo Quiz

University

16 Qs

Server Administration- Quiz 1

Server Administration- Quiz 1

12th Grade - University

10 Qs

Computer Science (1-9) - Identifying & Preventing Threats

Computer Science (1-9) - Identifying & Preventing Threats

University

11 Qs

DI (EM24) - Diseño de Contenidos (T8)

DI (EM24) - Diseño de Contenidos (T8)

University - Professional Development

20 Qs

ระบบปฏิบัติการ ชุดที่ 1

ระบบปฏิบัติการ ชุดที่ 1

University

15 Qs

Round 2 for Preplacement Bootcamp

Round 2 for Preplacement Bootcamp

University

15 Qs

LOOPING

LOOPING

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Gopal M

Used 61+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is wrong with the following Do loop?   Dim index As Integer = 1
Do While index <> 9  
MsgBox("Hello")
index =index+1   
Loop

(a)The test variable should not be changed inside a Do loop. 
(b) The test condition will never be true. 
(c) This is an infinite loop. 
(d) Nothing 

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Private Sub disp ()
Dim num as Double = 10  
Do While num > 1
MsgBox(num)
 num = num - 3
Loop
End Sub
 What numbers will be displayed in the list box when the button is clicked? 

(a) 10, 7, and 4 
(b)  10, 7, 4, and 1 
(c)10, 7, 4, 1, and -2 
(d) no output

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which While statement is equivalent to Until num < 100? 

(A)  While num <= 100 
(B) While num > 100 
(c) While num >= 100 
(d) (A)  There is no equivalent While statement. 

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is wrong with the following Do loop?   Dim index As Integer = 1
 Do While index <> 10  
MsgBox("Hello")
index =index+ 2  
Loop

(A)  It should have been written as a Do Until loop. 
(B) It is an infinite loop. 
(C)  The test variable should not be changed within the loop itself. 
(D) Nothing

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In analyzing the solution to a program, you conclude that you want to construct a loop so that the loop terminates either when (a < 12) or when (b = 16). Using a Do loop, the test condition should be 

(A)  Do While (a > 12) Or (b <> 16) 
(B)  Do While (a >= 12) Or (b <> 16) 
(c)  Do While (a < 12) Or (b <> 16) 
(D) (A)  Do While (a >= 12) And (b <> 16) 

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

When Visual Basic executes a Do While loop it first checks the truth value of the _________. 

(A)  pass 
(B)  loop 
(C) condition 
(D) statement

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If the loop is to be executed at least once, the condition should be checked at the __________. 

(A)  top of the loop 
(B)  middle of the loop 
(C)  bottom of the loop 
(D) Nothing should be checked. 

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?