c99 5.1.2.2.3 Program termination
——依然是这里
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;10)
——前提在黑体中
reaching the } that terminates the main function returns a value of 0.
——这是C99新加的, 和C++兼容。
If the return type is not compatible with int,
the termination status returned to the host environment is unspecified.
——void main属于这一类。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |