Oct 1, 2012 at 12:48pm
Line B is not executed first, line 9 is executed first
Oct 1, 2012 at 4:32pm
actually the problem is, on running the code :
A character is asked .(user types character and presses enter)
Then the ASCII value gets printed after you press 'Enter key'.
This means line 19 is causing me to press enter and then line 17 is displaying ASCII value.
why so?
Oct 1, 2012 at 4:46pm
Did you try cout.flush();
after line 17?
Oct 2, 2012 at 8:45am
If you don't want to press enter a second time, don't call "getchar( )".
Wazzak