Loops

Loops

5th - 12th Grade

16 Qs

quiz-placeholder

Similar activities

APCSA Arrays

APCSA Arrays

9th - 12th Grade

20 Qs

Fun with Loops

Fun with Loops

9th Grade

20 Qs

CSP Arrays

CSP Arrays

10th - 12th Grade

20 Qs

Quiz 2 Java

Quiz 2 Java

11th Grade

15 Qs

Arrays Review

Arrays Review

9th - 12th Grade

11 Qs

for and while loops level 2

for and while loops level 2

9th - 12th Grade

12 Qs

C++ While Loops

C++ While Loops

6th - 8th Grade

15 Qs

Loops Quiz

Loops Quiz

9th - 12th Grade

16 Qs

Loops

Loops

Assessment

Quiz

Computers

5th - 12th Grade

Medium

Created by

Khushi H

Used 369+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will the following program segment display?


for(int a = 2; a <= 10; a += 3)

System.out.print(a+””);

2 5 8

2 5

2 5 8 11

2

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How many times will the following code print "Welcome to Java"?
int count = 0;
while (count < 10) {
 System.out.println("Welcome to Java");
 count++;
}
8
9
10
0

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code?
int x = 0;
while (x < 4) {
 x = x + 1;
}
System.out.println("x is " + x);
0
1
3
4

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Repeating a task multiple times in programming is known as ?

Iterators

Scope

Looping

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which loop loops a set number of times?

for

while

infinite

loopy

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of these is the correct syntax for a loop?

for(int i = 0; i<10; 1++){}

fore(integer i = 0; i>10; i++){}

for(int i = 0; i<10){}

for(int i){}

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct way to create a String?

String s = "I am cool";

string string = i am cool;

String s = I am cool

String s = "I" am cool;

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?