+ 1

Find the value of a?

where b=10 a=++b+b

5th May 2020, 9:40 AM
shivansh gupta
3 Réponses
+ 2
value of a is 22 : a=++b+b here the value of b will increase first . Thus b=11 a=11+11=22
5th May 2020, 9:52 AM
Keerthy Sivadas
Keerthy Sivadas - avatar
+ 1
Hello there, the value of a is 22. Because : b = 10 a = ++b + b '++b' itself is 11 and it also makes b = 11. So, when we add b with '++b' that means we are adding 11 with 11. Finally a is 22.
5th May 2020, 9:46 AM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 1
shivansh gupta the value of a will be 22 First b will be 10 as b=10 Then b++ b became 11 a= ++b+b a=11+11=22
5th May 2020, 11:05 AM
Bensen