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
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);
Comments
Post a Comment