What is the reason?

When I running my program,without any result,the CMD window open for a moment then close.so I can't see my result of program

22nd Mar 2017, 3:36 PM
3 Answers
+ 18
This is because the program terminates after running. The simply way to solve this is to add a function which holds the output screen until the user decides to terminate the program. E.g. system("pause"); getch(); getchar(); etc
22nd Mar 2017, 3:39 PM
Hatsy Rei
Hatsy Rei - avatar
+ 7
use any of d functions to hold d screen before any next char input... like getch();
22nd Mar 2017, 3:48 PM
Ronit Kumar
Ronit Kumar - avatar
why the program terminates after running???
22nd Mar 2017, 3:46 PM