हिंदी

What is the value of y after evaluating the expression given below? y+= ++y + y-- + --y; when int y=8; - Computer Applications

Advertisements
Advertisements

प्रश्न

What is the value of y after evaluating the expression given below?

y+= ++y + y-- + --y; when int y=8; 

संक्षेप में उत्तर

उत्तर

33

Working:

y+= ++y + y-- + --y;

y = y + (++y + y-- + --y)

= 8 + (9 + 9 +7)

= 8 + 25

= 33

shaalaa.com
Introduction of Values and Data Types
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.04: Operators in Java - EXERCISES [पृष्ठ ४४]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 1.04 Operators in Java
EXERCISES | Q V. 6. (d) | पृष्ठ ४४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×