5754 / 3403 / 255
Ввод цифры без нажатия Enter'a, использование _getch()
| | maks_IQ
, конечно можно:
EXIT(3) Linux Programmer's Manual EXIT(3)
exit - cause normal process termination
void exit(int status);
The exit() function causes normal process termination and the value of status & 0377 is returned to the parent (see
All functions registered with atexit(3) and on_exit(3) are called, in the reverse order of their registration. (It
is possible for one of these functions to use atexit(3) or on_exit(3) to register an additional function to be exe‐
cuted during exit processing; the new registration is added to the front of the list of functions that remain to be
called.) If one of these functions does not return (e.g., it calls _exit(2), or kills itself with a signal), then
none of the remaining functions is called, and further exit processing (in particular, flushing of stdio(3)
streams) is abandoned. If a function has been registered multiple times using atexit(3) or on_exit(3), then it is
called as many times as it was registered.
All open stdio(3) streams are flushed and closed. Files created by tmpfile(3) are removed.
The C standard specifies two constants, EXIT_SUCCESS and EXIT_FAILURE, that may be passed to exit() to indicate
successful or unsuccessful termination, respectively.
The exit() function does not return.
А если вкратце, вызов exit(code) эквивалентен оператору return code внутри тела main (по крайней мере в сишке).