Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Program-termination/C/program-termination-1.c
Normal file
18
Task/Program-termination/C/program-termination-1.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include <stdlib.h>
|
||||
/* More "natural" way of ending the program: finish all work and return
|
||||
from main() */
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
/* work work work */
|
||||
...
|
||||
return 0; /* the return value is the exit code. see below */
|
||||
}
|
||||
|
||||
if(problem){
|
||||
exit(exit_code);
|
||||
/* On unix, exit code 0 indicates success, but other OSes may follow
|
||||
different conventions. It may be more portable to use symbols
|
||||
EXIT_SUCCESS and EXIT_FAILURE; it all depends on what meaning
|
||||
of codes are agreed upon.
|
||||
*/
|
||||
}
|
||||
5
Task/Program-termination/C/program-termination-2.c
Normal file
5
Task/Program-termination/C/program-termination-2.c
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
if(problem){
|
||||
abort();
|
||||
}
|
||||
1
Task/Program-termination/C/program-termination-3.c
Normal file
1
Task/Program-termination/C/program-termination-3.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
exit_group();
|
||||
Loading…
Add table
Add a link
Reference in a new issue