+ 4
Do you know when we return 0 or any value from main() function where does it actually returns to
3 Antworten
+ 16
The value is returned to your operating system.
+ 3
Hatsy rei i also feel the same the value goes to os which tells the processor that if program is successful executed or not, well i am not very much sure about this as this is documented no where
+ 1
Technically, in C or C++ main function has to return a value because it is declared as int main
which means main function should return integer data type
if main is declared as void no need for 0
0 just means no errors and is discarded.