是c中的main()是用户定义的还是预定义的函数? [英] is the main() in c is user defined or predefined function?

查看:160
本文介绍了是c中的main()是用户定义的还是预定义的函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

c中的main()是用户定义的还是预定义的函数?

is the main() in c is user defined or predefined function?

推荐答案

main是可执行文件的entry_point.

链接
main is the entry_point of an executable.

read detail about main in this link


中按语言阅读有关main的详细信息从角度来看,它是程序初始化代码在全局初始化完成后调用的函数,因此它是用户定义的".

是由用户自己提供,将其提供到其自己的源文件中,还是从其他库(例如MFC)进行链接,都取决于用户使用的环境.

这个问题似乎被形容为(某种)陷阱,因为它没有定义用户"的含义.
By the language point of view, it is the function that the program start-up code calls after global initialization finished, so it is "user defined".

Whether it is provided by the user itself, into its own source file, or linked from some other library (like MFC, for example) depends on what environment the user is working with.

The question seems formulated as a (sort of) trap, since it does not define what "user" means.


这篇关于是c中的main()是用户定义的还是预定义的函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆