|
|
“If the return type of the main function is a type compatible with int, a return from the initial call to the main function is equivalent to calling the exit function with the value
returned by the main function as its argument; reaching the } that terminates the
main function returns a value of 0. If the return type is not compatible with int, the
termination status returned to the host environment is unspecified.”
5.1.2.2.3 Program termination, ISO/IEC 9899:1999(E)
这段话比较拗口,对于main的退出,return 0; 这句是可选还是必须的? :ask |
|