
CPT 236 Test 2 Review
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Reza Naqvi
Used 4+ times
FREE Resource
Enhance your content in a minute
78 questions
Show all answers
1.
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");
}
8
9
10
11
0
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Do the following two statements in (I) and (II) result in the same value in sum?
(I):
for (int i = 0; i < 10; ++i) {
sum += i;
}
(II):
for (int i = 0; i < 10; i++) {
sum += i;
}
yes
no
3.
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
11
0
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the value in count after the following loop is executed?
int count = 0;
do {
System.out.println("Welcome to Java");
} while (count++ < 9);
System.out.println(count);
8
9
10
11
0
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How many times is the println statement executed?
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
System.out.println(i * j);
100
20
10
45
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the number of iterations in the following loop?
for (int i = 1; i < n; i++) {
// iteration
}
2*n
n
n - 1
n + 1
7.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Which of the following loops prints "Welcome to Java" 10 times?
for (int count = 1; count <= 10; count++) {
System.out.println("Welcome to Java");
}
for (int count = 0; count < 10; count++) {
System.out.println("Welcome to Java");
}
for (int count = 1; count < 10; count++) {
System.out.println("Welcome to Java");
}
for (int count = 0; count <= 10; count++) {
System.out.println("Welcome to Java");
}
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
83 questions
220-1002 Super Test
Quiz
•
University
74 questions
Pendalaman UP
Quiz
•
University
75 questions
SOAL UAS LOGIKA ALGORITMA DAN PEMROGRAMAN
Quiz
•
University
78 questions
Cspring10-13
Quiz
•
University
80 questions
Đề Cương Ôn Tập Tin Học 11 Cuối Học Kì 2
Quiz
•
11th Grade - University
79 questions
sicuretsa
Quiz
•
University
75 questions
PYTHON CERT REVIEWER
Quiz
•
University
80 questions
Computer grade10
Quiz
•
10th Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
9 questions
Principles of the United States Constitution
Interactive video
•
University
18 questions
Realidades 2 2A reflexivos
Quiz
•
7th Grade - University
10 questions
Dichotomous Key
Quiz
•
KG - University
25 questions
Integer Operations
Quiz
•
KG - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University
20 questions
SER vs ESTAR
Quiz
•
7th Grade - University
