+ 2
Why we use return 0 in C ???
☺☺☺
3 ответов
+ 15
In C and C++ programs the main function is of type int and therefore it should return an integer value. Thereturn value of the main function is considered the "Exit Status" of the application. On most operating systems returning 0 is a success status like saying "The program worked fine".
Source - https://www.codeproject.com/Questions/693038/why-do-we-have-to-use-return
+ 2
The main method is of int type and requires a returning integer value. Signifies a successful program execution.
0
when we give int as return type for any function. return keyword must became compulsory to Prescribed at end of function.Now come to 0...it means the function return the intger value 0.