gpt4 book ai didi

我可以在 C 中省略 return from main 吗?

转载 作者:太空狗 更新时间:2023-10-29 16:59:10 25 4
gpt4 key购买 nike

<分区>

在 C++ 中,3.6.1 主函数

(3.6.1/5) A return statement in main has the effect of leaving the main function (destroying any objects with automatic storage duration) and calling exit with the return value as the argument. If control reaches the end of main without encountering a return statement, the effect is that of executing return 0;

我可以在不返回 0 的情况下在 C99 中执行以下操作吗?

int main() { }

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com