Computer Applications
Evaluate the following if the value of x = 7, y = 5:
x += x++ + x + ++y
Java Operators
6 Likes
Answer
x += x++ + x + ++y
⇒ x = x + (x++ + x + ++y)
⇒ x = 7 + (7 + 8 + 6)
⇒ x = 7 + 21
⇒ x = 28
Answered By
2 Likes
Related Questions
Give the output of the following expression:
a+= a++ + ++a + --a + a--; when a = 7;What is the value of y after the execution?
y+= ++y + y-- + --y; when int y=8Give the output of the following:
int x = 2, y = 4, z = 1; int result = (++z) + y + (++x) + (z++);Give the output of the following:
int f = 10, m = 9; String e = (m % f == 9)? "YES": "NO"; System.out.print(e);