int main ()
{
hello();
return 0;
}
int hello()
{
printf("\n hello world");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
根据C规则,下面定义的每个函数main()必须在上面声明,main() 但为什么它int作为返回类型的函数的异常?如果你将返回类型hello() 改为其他任何东西(void,char*等),它将抛出错误声明.为什么int 返回类型没有错误或警告?