मराठी

Evaluate the Java expression: x = a *b% (++c) + (++a) + (−−b); if a =7, b= 8, c =2 - Computer Applications

Advertisements
Advertisements

प्रश्न

Evaluate the Java expression:

x = a *b% (++c) + (++a) + (−−b);

if a =7, b= 8, c =2

मूल्यांकन
Advertisements

उत्तर

Given

a = 7, b = 8, c = 2.

++c makes c = 3, so a * b % (++c) = 7 * 8 % 3 = 56 % 3 = 2.

++a makes a = 8 (value 8).

−−b makes b = 7 (value 7).

So x = 2 + 8 + 7 = 17.

Final values: x = 17, a = 8, b = 7, c = 3.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2025-2026 (March) Official Board Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×