मराठी

If a = 12, give the value of the following expression: --a + (++a)

Advertisements

प्रश्न

If a = 12, give the value of the following expression:

--a + (++a)

संख्यात्मक
Advertisements

उत्तर

Given: a = 12

Expression: --a + (++a)

The pre-decrement operator (--a) first decreases the value of a by 1, while the pre-increment operator (++a) increases it by 1.

--a = 12 − 1 = 11

++a = 11 + 1 = 12

Therefore,

= 11 + 12

= 23

  • Value of expression (--a + (++a)) = 23
  • New value of a = 12
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Variables and Expressions - EXERCISE [पृष्ठ १३५]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
पाठ 6 Variables and Expressions
EXERCISE | Q 59. (f) | पृष्ठ १३५
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×