LOOPING

LOOPING

University

15 Qs

quiz-placeholder

Similar activities

Basic Java

Basic Java

University

15 Qs

Unit-2 Test-1

Unit-2 Test-1

University

20 Qs

Programming Methods

Programming Methods

12th Grade - University

10 Qs

البرمجة بلغة فيجوال بيسك

البرمجة بلغة فيجوال بيسك

University

12 Qs

C programming-1

C programming-1

University

13 Qs

PERULANGAN WHILE DO

PERULANGAN WHILE DO

University

20 Qs

TECHNICAL C PROGRAM

TECHNICAL C PROGRAM

University

10 Qs

FST Class 2023- Quiz 2

FST Class 2023- Quiz 2

University

10 Qs

LOOPING

LOOPING

Assessment

Quiz

Computers

University

Hard

Created by

Gopal M

Used 61+ times

FREE Resource

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. 

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?