The return value of main() function shows how the program exited. The normal exit of program is represented by zero return value. If the code has errors, fault etc., it will be terminated by non-zero value.
Table of contents:
main() in C / C++The exit() functionmain() in C / C++
Here is the syntax of main() function in C/C++ language,
int main() { // Your program return 0;}
The valid C/C++ main signatures are:
int main()int main(int argc, char* argv[])int main(int argc, char** ...
Published on January 03, 2022 01:10