Why can't `main` return a double or String rather than int or void?
- by sunny
In many languages such as C, C++, and Java, the main method/function has a return type of void or int, but not double or String. What might be the reasons behind that?
I know a little bit that we can't do that because main is called by runtime library and it expects some syntax like int main() or int main(int,char**) so we have to stick to…