- This topic has 1 reply, 2 voices, and was last updated 17 years, 7 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- The forum ‘C Programming’ is closed to new topics and replies.
Home › Forums › C Programming › differencein exit(0),exit(1)and exit(-1)
please tell me difference between the exit(0),exit(1)and exit(-1) stored in stdlib.h header file in C .
@alok wrote:
please tell me difference between the exit(0), exit(1) and exit(-1) stored in stdlib.h header file in C .
Exit codes tell the operating system about the exit status of the program you’re executing.exit(0) represents successful execution and termination of the program.exit(1) represents general errors like divide by zero etc.exit(-1) represents unsuccessful execution.Google around a bit for more details.