0
Program to demonstrate exit statement
#include<iostream.h>
3 Answers
+ 1
int main()
{
cout<<"loop";
for(i=0;i<10;i++)
{
cout<<i;
if(i==6)
exit(0);
}
cout<<"hello ";
}
+ 1
Output
------------
loop0123456
+ 1
Here as you see hello is not printed so it mean after exit function program execution stops