Can the C main() function be static?

前端 未结 5 825
北荒
北荒 2021-01-01 17:00

Can the main() function be declared static in a C program? If so then what is the use of it?

Is it possible if I use assembly code and call

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-01 17:23

    As others have said, no it can't. And that goes double if you ever intend to port your code to C++, as the C++ Standard specifies that main() need not actually be a function.

提交回复
热议问题