相关疑难解决方法(0)

避免C程序中的主(入口点)

是否可以避免C程序中的入口点(主).在下面的代码中,是否可以在func()不通过main()以下程序调用via的情况下调用该调用?如果是,如何做,何时需要,为什么要给出这样的规定?

int func(void)
{
     printf("This is func \n");
     return 0;
}

int main(void)
{
     printf("This is main \n");
     return 0;
}
Run Code Online (Sandbox Code Playgroud)

c compiler-construction operating-system function entry-point

17
推荐指数
3
解决办法
7874
查看次数