Reply To: differencein exit(0),exit(1)and exit(-1)

Home Forums C Programming differencein exit(0),exit(1)and exit(-1) Reply To: differencein exit(0),exit(1)and exit(-1)

#3209

@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.

0 Shares
Share
+1
Tweet
Share
Stumble