main()
函数在 C 中称为用户定义函数。但它与其他用户定义函数有何不同?
The main()
function is just a regular user-defined function — but it has two special properties:
main()
without an explicit return
statement, it is equivalent to return 0;
. No other function gets that privileged treatment. See also What should main()
return in C and C++? for some caveats about the second point.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.