English

What will be the output of the following code? If int y = 10 then find int z = ( ++y * (y++ + 5)); - Computer Applications

Advertisements
Advertisements

Question

What will be the output of the following code?

If int y = 10 then find int z = ( ++y * (y++ + 5));

Answer in Brief

Solution

176

Working:

z = ( ++y * (y++ + 5))

= 11 * (11 + 5)

= 11 * 16

= 176

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.04: Operators in Java - EXERCISES [Page 44]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.04 Operators in Java
EXERCISES | Q V. 6. (b) | Page 44
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×