a= 5 , b = 6
a = (b++) + 3;
c = 2*a + (++b);
d = 2 * (++c) - (a++);
What are the values?
a= 5 , b = 6
a = (b++) + 3;
c = 2*a + (++b);
d = 2 * (++c) - (a++);
What are the values?
Try to reason out the answers then put those statements into a program and see the output for yourself.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Fix it. What is your current program?Originally Posted by xbusterx
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Can you produce the steps that you come to that conclusion from? [hint: I think it's wrong, I think I know WHERE you are going wrong, but it's much easier to explain what you are doing wrong if you actually show the individual steps of your calculation].
--
mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Why do you declare a = 5, then later a = (b++) + 3 o.O?
Currently research OpenGL