Evaluate a+a+++a if a= 20 initially
Answers
Answered by
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.
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
8
20 + 20 + 21= 61. This is the answer.
Similar questions