in c/cpp, how can we check the returned value to the OS of main(or exit, ...) function? just i want to know. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

in c/cpp, how can we check the returned value to the OS of main(or exit, ...) function? just i want to know.

in c/cpp, we know that the main(or exit sometime) function returns 0 for success and non-zero for failure of the program to OS.

18th Oct 2017, 6:22 AM
MD QAYAMUDDIN
MD QAYAMUDDIN - avatar
1 Antwort
+ 1
You will have to use your operating system's API, which of course is dependent on the target OS.
18th Oct 2017, 6:51 AM
aklex
aklex - avatar