+ 1

Such an expression where value of a variable is being modified more than once is dependent upon the compiler or not?

for eg: (++x) *(++x) when x=5 will give different results for different compilers or not?

2nd Aug 2017, 11:14 AM
Devansh
2 Réponses
+ 1
It depends upon the compiler ) and feel free to do not prove me wrong .
3rd Aug 2017, 11:33 AM
syscall
syscall  - avatar
0
This should always have the same result. Mathematcly your term is (x+1) * (x+2) which with x =5 should always be 42. But feel free to prove me wrong,
3rd Aug 2017, 9:16 AM
Fabian Ess
Fabian Ess - avatar