Exit Function in C

 Exit ( ) Function in C

The exit() function is used to terminate program execution and to return to the operating system. The return code "0" exits a program without any error message, but other codes indicate that the system can handle the error messages.

Exit ( 0 ) - This indicates that the program exits without returning any error message.
Exit ( 1 ) - This indicates that the program exits, indicating that something went wrong.

*** Exit function is defined under the header stdlib.h

Syntax of the exit function
void exit(int return_code);

Example of exit ( ) function

Comments

Popular posts from this blog

Bubble Sort ( C & Python 3)

Something about me

Comparison Logical and Bitwise Operator ( Java Part - 4 )