
QUIZ ON OPERATORS & CONTROL STATEMENTS
Authored by Renugadevi Professor
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?
a) do-while
b) while
c) for
d) none of the mentioned
2.
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);
}
}
1
2
3
4
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
. What will be the output of the following Java program?
class comma_operator
{
public static void main(String args[])
{
int sum = 0;
for (int i = 0, j = 0; i < 5 & j < 5; ++i, j = i + 1)
sum += i;
System.out.println(sum);
}
}
5
6
14
compialtion error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
final int a=10,b=20;
while(a<b)
{
System.out.println("Hello");
}
System.out.println("World");
}
}
Hello
run time error
Hello world
compile time error
5.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What would be the output of the following code snippet if variable a=10?
if(a<=0)
{
if(a==0)
{
System.out.println("1 ");
}
else
{
System.out.println("2 ");
}
}
System.out.println("3 ");
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is returned by “greater than”, “less than” and “equal to” operators?
Integers
Floating – point numbers
Boolean
None of the mentioned
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these operators can skip evaluating right hand operand?
a) !
a) !
b) |
c) &
d) &&
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
15 questions
Web Dev Midterm Quiz
Quiz
•
University
15 questions
Conditionals Unit Quiz
Quiz
•
9th Grade - University
13 questions
Functions
Quiz
•
5th Grade - Professio...
10 questions
Structure Data Review
Quiz
•
University - Professi...
10 questions
C++ linked list
Quiz
•
University
15 questions
CIS1101-programming practice
Quiz
•
University
10 questions
pointers and structures
Quiz
•
University
10 questions
C Viva
Quiz
•
University
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
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University