exit function : is terminates entire program. Here it is used in for loop when the value of i is eqauls to 100 then exit(0) will be executed and the program will be terminated.
#include<process.h> // requires to include for exit() function
for (int i=1;i<=100; i++)
cout << i <<endl;
exit(0); // it will termiate entire program
cout << "hello" <<endl; // this statement will never execute.