3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by dhruv_arora
0

The paramarater is the value that the program will return to the operating system so that other programs can use it for some purpose. The value 0 traditionally means the program exits normally without error. Any other value would mean the program encountered some kind of error. The value of the parameter to exit() can be anything you want, its not limited to the three that you posted.

0

Exit(0) , is commonly used as a successful exit message. Usually, you don't use it, use instead Return 0; Exit(1) Is used to reference some kind of abnormal program termination.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.