- What will be the output of the following program code?
int a=0,b=30,c=40;
a=--b+c++ +b;
System.out.println(a);
Computer Quiz(Java)(16-10-2020)
Quiz
•
Computers
•
9th Grade
•
Hard
Sherlin Anup
Used 30+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int a=0,b=30,c=40;
a=--b+c++ +b;
System.out.println(a);
97
90
98
100
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
int a=27;
a/=3;
System.out.println(a);
24
30
9
3
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The method which returns the value of the argument a which may be of either float or double data type rounded to the nearest integer is ________________
Math.ceil(a)
Math.floor(a)
Math.round(a)
Math.rint(a)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A bug in a program that causes it to operate incorrectly, but not to terminate abnormally is ______________
Syntax Error
Semantics Error
Logical Error
Runtime Error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which among the following forms of Operators works with three Operands?
Unary
Binary
Ternary
Tertiary
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Give the output of the following code.
class op
{
public static void main(String args[])
{
int m=0,n=0;
int p=--m*--n*n--*m--;
System.out.println(p);
}
}
1
0
-1
2
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Give the output of the following code?
public class op7
{
public static void main(String args[])
{
int i=11;
int j=i++ +i--;
System.out.println(j);
}
}
21
22
23
20
12 questions
Java - arrays and String methods
Quiz
•
9th - 12th Grade
10 questions
Logic Building in Java Part 1
Quiz
•
6th - 9th Grade
13 questions
APCSA Unit 3 Review
Quiz
•
9th - 12th Grade
11 questions
Casting in Java
Quiz
•
9th - 12th Grade
7 questions
Looping in java
Quiz
•
9th Grade
15 questions
Programación con Java
Quiz
•
9th - 11th Grade
15 questions
Java Script Quiz
Quiz
•
9th - 12th Grade
15 questions
Basics in Java
Quiz
•
9th - 12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University