Computer Applications
If a = 24, b = 15, find the value of:
a += b++ * 5 / a++ + b
Java Operators
18 Likes
Answer
a += b++ * 5 / a++ + b
⇒ a = a + (b++ * 5 / a++ + b) [a = 24, b = 15]
⇒ a = 24 + (15 * 5 / a++ + b) [a = 24, b = 16]
⇒ a = 24 + (15 * 5 / 24 + 16) [a = 25, b = 16]
⇒ a = 24 + (75 / 24 + 16)
⇒ a = 24 + (3 + 16)
⇒ a = 43
Hence, final value of a is 43
Answered By
10 Likes
Related Questions
Write the value of n and m after execution of the following code.
int m; int n; m = 5; n = (5 * ++m) % 3; System.out.println("n = " + n + "m =" + m);Predict the output
(a) Math.pow(3.4, 2) + 2 * Math.sqrt(64)
(b) Math.ceil(3.4) + 2 * Math.floor(3.4) + 2
Give the prototype of a function search, which receives a sentence sentc and a word wrd and returns 1 or 0.
How many times will the following loop execute?
int x = 2, y = 50; do { ++x; y -= x++; } while (x <= 10); return y;