Evaluate the following if the value of x=7, y=5
x += x++ + x + ++y
114 Likes
x += x++ + x + ++y⇒ x = x + (x++ + x + ++y)⇒ x = 7 + (7 + 8 + 6)⇒ x = 7 + 21⇒ x = 28
Answered By
69 Likes
Identify the operator that gets the highest precedence while evaluating the given expression:
a + b % c * d - e
Evaluate the given expression when the value of a=2 and b=3
b*=a++ - ++b + ++a; System.out.println("a= "+a); System.out.println("b= "+b);