C language program running results flash back how to do

Learn to compile C language friends may encounter such a problem, program debugging when there is no error, but when running the results will find that the program results flash back, resulting in no results. The following solutions are given for such problems.
Take the simplest program, for example

} getchar();} getchar(); Can. It is important to note that this approach is not suitable for all programs, but we will look at the second approach next.

Method 2: & lt; 1> Start by adding the header file #include <; stdlib.h> As shown in figure
& lt; 2> Then write a line at the end of the program’s main function (system(“pause”));

Obviously, when the first method does not work, the second method can be used, and it works in all cases.
 
 

Read More: