0
Why do we have to write int with main()
4 ответов
+ 7
Because main() is a function which returns an integer value to the operating system.
+ 1
The system only calls the main function and nothing else. Further calls are your responsibility. If your main doesn't exist it will give an error of not finding entry point, if it's blank well - it will do what it's told to - nothing.
0
What will happen if I don't write codes in main() but in another function such as"test()", and I don't have any other functions?
0
Got it.Thanks