wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

operators

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

What is the value of y if x = 5

y = ++x - x++ + --x

(a)  

2.

What will be the value of m if m = 8

m *= 8

(a)  

3.

++ increases the value of a variable by 1

a)

assignment operator

b)

decrement operator

c)

increment operator

d)

sentinel

4.

What would the new value of A be?

A=1;

a++;

a)

1

b)

2

c)

3

d)

4

5.

What's the value of below?


int i=5;

System.out.println(i++);

System.out.println(i);

System.out.println(++i);

a)

5

6

7

b)

6

6

7

c)

6

7

8

d)

5

5

6

6.

Evaluate the following expression if the value of x=2, y=3 and z=1.

v = x + ––z + y++ +y

(a)  

7.

What will be the output of the following, if x = 5 initially?

5 * x++;

(a)