| exit(0) |
exit(1) |
| Reports the successful termination/completion of the program. |
Reports the abnormal termination of the program. |
| Reports the termination when the program gets executed without any error. |
Reports the termination when some error or interruption occurs during the execution of the program. |
| The syntax is exit(0); |
The syntax is exit(1); |
| The usage of exit(0) is fully portable. |
The usage of exit(1) is not portable. |
| The macro used for return code 0 is EXIT_SUCCESS |
The macro used for return code 1 is EXIT_FAILURE |
| EXIT_SUCCESS is defined by the standard to be zero. |
EXIT_FAILURE is not restricted by the standard to be one, but many systems do implement it as one. |