
PU Day 1 assessments - Srinivas's batch

Quiz
•
Professional Development
•
Professional Development
•
Easy
training atomm
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class selection_statements
{
public static void main(String args[])
{
int var1 = 5;
int var2 = 6;
if ((var2 = 1) == var1)
System.out.print(var2);
else
System.out.print(++var2);
}
}
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class TestOutput
{
public static void main(String args[])
{
int a = 10;
int b = 20;
if (a < b)
System.out.print(a + b);
else
System.out.print(a - b);
}
}
30
-10
10
20
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class CompareValues
{
public static void main(String args[])
{
int x = 15;
int y = 15;
if (x == y)
System.out.print("Equal");
else
System.out.print("Not Equal");
}
}
Equal
Error
Not Equal
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class LoopExample
{
public static void main(String args[])
{
for (int i = 0; i < 3; i++)
System.out.print(i);
}
}
}
321
None
123
012
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times will the following do-while loop execute?
int i = 1;
do {
System.out.println(i);
i++;
} while(i <= 5);
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class StringComparison
{
public static void main(String args[])
{
String str1 = "Hello";
String str2 = "Hello";
if (str1.equals(str2))
System.out.print("Match");
else
System.out.print("No Match");
}
}
None of the above
Match
Error
No Match
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class ConditionalCheck
{
public static void main(String args[])
{
int num = 8;
if (num % 2 == 0)
System.out.print("Even");
else
System.out.print("Odd");
}
}
Even
Odd
None of the above
Error
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python Test 3A

Quiz
•
Professional Development
9 questions
PreTrainingJavaScript

Quiz
•
Professional Development
15 questions
C Operators

Quiz
•
University - Professi...
10 questions
PU- Day 1 Assessments slot 2 - Srinivas's Class

Quiz
•
Professional Development
10 questions
Java Summer Internship Quiz-11

Quiz
•
Professional Development
10 questions
Day17_Quiz_NBKR

Quiz
•
Professional Development
5 questions
python MCQ

Quiz
•
Professional Development
9 questions
Quiz - 2

Quiz
•
Professional Development
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade