Actually it depends on the compiler .On Dev C++ it gives 10 and on Turbo C++ the value is 9.
ans will be 10 as preincrement follows first change then use
++x means first increment if x=3 then ++3 is 4.
++x + ++x=4+5=9
Actually it depends on the compiler .On Dev C++ it gives 10 and on Turbo C++ the value is 9.
ans will be 10 as preincrement follows first change then use
++x means first increment if x=3 then ++3 is 4.
++x + ++x=4+5=9