Which IDE are you using? If you are using Visual studio then run it by pressing "CTRL + F5"
How are you trying to run the code?
use getchar() just before the "return 0" statement
vjkumar like this