The exit () function

Just as we can break out of a loop, we can break out of a program by using stranded library function exit (). This function causes immediate termination of the enter program, forcing a return to the operating system.

The general form the exit () function is

void exit (int return _code);


The value of return _ code is returned to the calling the process, which is usually the operating system. Zero is generally used as a return code to indicate normal program termination. Other arguments are used to indicate some sort or error.



About the Author



Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.

We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc





 PreviousNext