
Quiz No.2

Quiz
•
Computers
•
12th Grade
•
Medium
Richard Reforma
Used 2+ times
FREE Resource
8 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
What will be the value of variable a?
int x=25;
int y= 16;
int a=x-y;
System.outprintln(a);
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the output of this codes once you run the program?
int currentScore = 50;
int level = 2;
int newScore;
newScore = currentScore * level;
System.out.println("New Score is: " + newScore);
New Score is newScore
New Score is 50
New Score is 100
New Score is 50*2
3.
FILL IN THE BLANK QUESTION
45 sec • 2 pts
What will be the value of variable c?
int a=10;
int b= 5+3;
int c=(a+b)/2;
System.outprintln(c);
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the correct syntax in importing Scanner Class?
import java.Util.Scanner;
import Java.UtilScanner;
import Java.Util,Scanner:
import java.util.Scanner;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Based on the given codes below, you need to find the error in the codes?
Scanner in = new Scanner(System.in);
System.out.print("Enter your name: ");
String name ; in.nextLine();
System.out.println("Name is: " + name);
:
=
,
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the correct output of the program?
int a = 10;
int b = 20;
int c = 25;
System.out.println("b % a = " + (b % a) );
System.out.println("c % a = " + (c % a) );
b % a = 10
c % a = 20
b % a = 0
c % a = 0
b % a = 0
c % a = 5
b % a = 5
c % a = 0
7.
FILL IN THE BLANK QUESTION
1 min • 5 pts
The written code below will accept 3 numbers from the user, what will be the output of the program if I entered 5, 9, and 16?
Scanner input = new Scanner(System.in);
System.out.print("Enter the Number 1 : ");
double n1 = input.nextDouble();
System.out.print("Enter the Number 2 : ");
double n2 = input.nextDouble();
System.out.print("Enter the Number 3 : ");
double n3 = input.nextDouble();
System.out.print("The Average value : " + ((n1 + n2 + n3) / 3 ));
8.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
What is the correct syntax to create an object of Scanner class?
Scanner input =new Scanner (System.in);
scanner input =new Scanner (system.in);
scanner input =new scanner (System;in);
Scanner input =new Scanner (System.in):
Similar Resources on Wayground
13 questions
Thunkable Intro!

Quiz
•
9th - 12th Grade
10 questions
THỰC HÀNH SỐ 1

Quiz
•
12th Grade
10 questions
SISTEM KOMPUTER Kelas 8

Quiz
•
8th Grade - University
10 questions
Algoritmo y estrucutura de datos S4

Quiz
•
12th Grade
10 questions
Computer hardware and software Lesson 8)

Quiz
•
12th Grade
10 questions
Computer Hardware Quiz

Quiz
•
8th - 12th Grade
10 questions
Session 1

Quiz
•
9th - 12th Grade
11 questions
INFORMÁTICA - WINDOWS

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade