What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
int a = 1;
int b = 2;
int c = 3;
a |= 4;
b >>= 1;
c <<= 1;
a ^= c;
System.out.println(a + " " + b + " " + c);
}
}
3 1 6
2 2 3
2 3 4
3 3 6
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
What will be the output of the following Java code?
Solution |
2
Discuss
|
What will be the output of the following Java program?
Solution |
3
Discuss
|
Which of these is not a bitwise operator?
Solution |
4
Discuss
|
Which of these operators can skip evaluating right hand operand?
Solution |
5
Discuss
|
What will be the output of the following Java code?
Solution |
6
Discuss
|
What is the order of precedence (highest to lowest) of following operators? 1. & 2. ^ 3. ?:
Solution |
7
Discuss
|
Which of these is returned by “greater than”, “less than” and “equal to” operators?
Solution |
8
Discuss
|
What will be the output of the following Java program?
Solution |
9
Discuss
|
What will be the output of the following Java code?
Solution |
10
Discuss
|
Decrement operator, −−, decreases the value of variable by what number?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved