Computer Science, asked by Bh8and8humusaims, 1 year ago

Evaluate a+a+++a if a= 20 initially

Answers

Answered by kvnmurty
8
a = 20 initially.

1)..  This is the default way the compiler will compile code...
a  +   a++   +   a
        =>   20    +   20    +  21    = 61

2)..
a  +  a  +    ++a
       =>  20 + 20 + 21 = 61

The evaluation for  + or addition happens from left to right.

Answered by mayank100
8
20 + 20 + 21= 61. This is the answer.
Similar questions