Computer Applications
Evaluate the following if the value of x = 20 and y = 20 and z = 10
z *= ++x * (y--) - y
Java Operators
6 Likes
Answer
z *= ++x * (y--) - y
⇒ z = z * (++x * (y--) - y)
⇒ z = 10 * (21 * (20) - 19)
⇒ z = 10 * (420 - 19)
⇒ z = 10 * 401
⇒ z = 4010
Answered By
3 Likes
Related Questions
A student executes the following code to increase the value of a variable ‘x’ by 2.
He has written the following statement, which is incorrect.
x = +2;What will be the correct statement?
A. x +=2;
B. x =2;
C. x = x +2;- Only A
- Only C
- All the three
- Both A and C
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);Identify the operator that gets the highest precedence while evaluating the given expression:
a + b % c * d - e
- +
- %
- -
- *