
Unit 4 practice question set 3
Authored by Caleb Kim
Computers
9th - 12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int x = 8;
int y = 7;
boolean b = x<y || x==8;
System.out.println(b);
True
False
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is the output of the following code?
int x = 5;
int y = 3;
if(x-- < 5 && y-->2)
System.out.print("A");
if(x==4 && ++y>1)
System.out.print("B");
if(x==y)
System.out.print("C");
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int x=1;
if(x<3)
System.out.println("small");
if(x<6)
System.out.println("medium");
if (x<10)
System.out.println("large");
large
small
medium
large
medium
small
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When does an || statement short-circuit?
When the left operand is false
When the right operand is true
When the right operand is false
When the left operand is true
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int x = 8;
int y = 7;
boolean b = x<y && x==8;
System.out.println(b);
True
False
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
int a = 5;
if (a > 0) {
if (a < 10) {
System.out.println("Small number");
} else {
System.out.println("Large number");
}
}
Compilation error
Small number
Large number
No output
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code when temperature is set to 75?
int temperature = 75;
if (temperature < 60) {
System.out.println("Cold");
} else if (temperature >= 60 && temperature < 80) {
System.out.println("Warm");
} else {
System.out.println("Hot");
}
no output
hot
warm
cold
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
13 questions
Pengenalan Aplikasi Blender
Quiz
•
11th Grade
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
12 questions
1.2.4. Types of Programming Language
Quiz
•
12th Grade
13 questions
LENGUAJE C
Quiz
•
11th Grade
20 questions
CSS - Operating System
Quiz
•
11th Grade
20 questions
Browser dan CMS
Quiz
•
7th - 9th Grade
20 questions
Administrasi Sistem jaringan KD1
Quiz
•
1st - 10th Grade
12 questions
Clase de Computación: Excel
Quiz
•
11th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade