Operators in Java

0%
26
Created on By Baibhav Computer

Operators in Java

1 / 10

  1. State the value a, b and c after the execution of each of the following statements where a=12,b=13 and c=11;

a=a++ + --b + c++;

System.out.println(a);

2 / 10

What will be the result stored in x after evaluating the following expression?

int x=4;

x += (x++) + (++x) + x;

3 / 10

Write the following statements using correct usage of the operators:

X is greater than equal to Y.

4 / 10

int a=12,b=13,c=6;

c+=a+b%2;

b-=a+2*c;

System.out.println(c);

System.out.println(b);

5 / 10

If a = 5, b = 9 calculate the value of:

a+ = a++ - ++b + a

6 / 10

What will be the output of the above statements:

int a=10, b=25;

System.out.println("a == b = " + (a == b) );

System.out.println("a != b = " + (a != b) );

7 / 10

Give the output of the following expression:

a+=a++ + ++a + --a + a--; when a=7.

8 / 10

If int y=10 then find:

int z=(++y * (y++ +5));

9 / 10

If int a= 6;

What will  be the output of the following expression:

int z= a++  +  ++a

10 / 10

What is the value of y after evaluating the expression given below?

y+=++y + y-- + --y; when int y=8

Previous Post
Newer Post