0
Explain : exit(EXIT_SUCCESS) and exit(EXIT_FAILURE)
In cpp
4 Answers
+ 6
In relation to C/C++ language:
EXIT_SUCCESS and EXIT_FAILURE are macros defined in <stdlib.h> (for C) and <cstdlib> (for C++). They can be used as argument for `exit` function, which notifies other program whether there is a problem during runtime that the program couldn't complete its work (EXIT_FAILURE), or that the program completed its runtime with no problem at all (EXIT_SUCCESS).
Reference:
https://en.cppreference.com/w/cpp/utility/program/EXIT_status
https://en.cppreference.com/w/c/program/EXIT_status
P.S. Please tag a relevant language â
+ 3
Patel Dhruv can you stop spamming? You already made a question and spammed in it yourself. Aren't you satisfied with spamming now? Spam once more and I'll report you.