This question is out of curiosity; when writing the main one for the test program, I did not return anything from main(no returnstatement in main). But I called main int main(). And it compiled successfully.
If, as if some other function was written with a return type intand did not actually return int, I would get an error
"Function Name" should return a value
So why does the compiler not complain about the function main?
source
share