I want to know how and when can I use the exit() function like the program in my book:
exit()
#include void main() { int goals;
Try man exit.
Oh, and:
#include int main(void) { /* ... */ if (error_occured) { return (EXIT_FAILURE); } /* ... */ return (EXIT_SUCCESS); }