1. a | 4 + c >> b & 7;
2. (a | ((( 4 * c ) >> b ) & 7 ))Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
102
Questions
4/6
Page
Pick an option on a question to see the right answer and solution.
1. a | 4 + c >> b & 7;
2. (a | ((( 4 * c ) >> b ) & 7 ))Select an option to see the answer and solution.
class Output
{
public static void main(String args[])
{
int a = 5;
int b = 10;
first:
{
second:
{
third:
{
if (a == b >> 1)
break second;
}
System.out.println(a);
}
System.out.println(b);
}
}
}Select an option to see the answer and solution.
class operators
{
public static void main(String args[])
{
int x = 8;
System.out.println(++x * 3 + " " + x);
}
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
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);
}
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
class increment
{
public static void main(String args[])
{
int g = 3;
System.out.print(++g * 8);
}
}Select an option to see the answer and solution.
class Output
{
public static void main(String args[])
{
int x=y=z=20;
}
}Select an option to see the answer and solution.
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");
}
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
class Output
{
public static void main(String args[])
{
boolean a = true;
boolean b = false;
boolean c = a ^ b;
System.out.println(!c);
}
}Select an option to see the answer and solution.
int x, y, z;
x = 0;
y = 1;
x = y = z = 8;Select an option to see the answer and solution.
class Output
{
public static void main(String args[])
{
int a = 1;
int b = 2;
int c;
int d;
c = ++b;
d = a++;
c++;
b++;
++a;
System.out.println(a + " " + b + " " + c);
}
}Select an option to see the answer and solution.
class Output
{
public static void main(String args[])
{
int x , y = 1;
x = 10;
if (x != 10 && x / 0 == 0)
System.out.println(y);
else
System.out.println(++y);
}
}Select an option to see the answer and solution.
Select an option to see the answer and solution.
class bitwise_operator
{
public static void main(String args[])
{
int a = 3;
int b = 6;
int c = a | b;
int d = a & b;
System.out.println(c + " " + d);
}
}Select an option to see the answer and solution.
1. &&
2. ==
3. ?:
4. +=Select an option to see the answer and solution.