What is the value of x1 if x=5?
x1 = ++x – x++ + – –x
Unit 4: Operators in Java
Quiz
•
Computers
•
9th - 10th Grade
•
Hard
Rajat Shenoi
Used 77+ times
FREE Resource
19 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
What is the value of x1 if x=5?
x1 = ++x – x++ + – –x
2.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
Evaluate the value of n if value of p = 5, q = 19
int n = (q – p) > (p – q) ? (q – p) : (p – q);
3.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
Find the output of the following program segment, when:
int val=1600, sum, n = 550;
sum = n + val > 1750 ? 400 : 200;
System.out.println(sum);
4.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
What is the value of y, when the following statements are executed?
int a = 63, b = 36;
int y = (a < b) ? a : b;
5.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
If a = 5, b = 9 calculate the value of a += a++ – ++b + a.
6.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
What is the value of x, when the following statements are executed?
int a = 63, b = 36;
boolean x = (a > b) ? true : false;
7.
FILL IN THE BLANK QUESTION
2 mins • 1 pt
What will be the output for the following program segment?
int a = 0, b = 30, c = 40;
a = – –b + c++ + b;
System.out.println(“a = ”+a);
16 questions
Loops
Quiz
•
5th - 12th Grade
15 questions
computer class output upto for loop
Quiz
•
9th Grade
15 questions
JavaScript and Graphics
Quiz
•
9th - 12th Grade
21 questions
Синтаксис Python
Quiz
•
7th - 11th Grade
14 questions
Limbajul de programare C++ ” INSTRUCȚIUNEA IF”
Quiz
•
10th Grade
20 questions
Java Conditional Constructs
Quiz
•
9th - 10th Grade
16 questions
Loops Quiz
Quiz
•
9th - 12th Grade
20 questions
Linguaggio C++
Quiz
•
10th - 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
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
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