Computer Science, asked by jiyamukherjee9919, 11 months ago

What is the value of variable b? a = 25; b = (++a) + 7;

Answers

Answered by priyankasingh38
0

(25)+7

25+7

=32

Please mark as brilliant

Answered by shilpa85475
0

Value of b is 33.

Explanation:

There are increment and decrement operators. They increase or decrease the value of the variable respectively by 1. Calculations become very fast using these kinds of operators. Only point to remember is that ‘++a’ means first change then use and ‘a++’ means first use then change.

The given statement says: a = 25; b = (++a) + 7;

The value of b will be calculated as ++a= 26 (25+1) //increasing the value of a by 1 as (++a). Then 7 will be added to 26 which will give answer as 33.

Similar questions