what is the difference between exit(1) & exit (-1) ?
what is the difference between exit(1) & exit (-1) ?
Collapse
X
-
zakaryaTags: None -
The exit() library function has only two possible returns: success (typically 0) and failure (typically 1).
Any other return values are non-standard and depend upon a particular implementation of the OS.
Avoid all hard-ced values in your code. You should be using :
orCode:exit(EXIT_SUCCESS);
Code:exit(EXIT_FAILURE);
Comment