The quick_exit() function is defined in the stdlib header file. The quick_exit() function is used for normal termination of a process without completely cleaning the resources.
- If val is zero or EXIT_SUCCESS, it shows successful termination of program.
- If value is non-zero or EXIT_FAILURE, it shows that program is not successfully terminated. These function are called in the reverse order of there calling.
void quick_exit(int val);
Parameter: This method takes a single paramter val which is an integral value that represent the exit status of a program.
Return Value: This function doesn’t returns anything.
Below program illustrate the quick_exit() function in C++:
Exit Function 2 Exit Function 1
This article is attributed to GeeksforGeeks.org