The fact that the code is "compiled" as a c program does not mean that you can do it. The compiler must warn of an implicit function declaration foo().
In this particular case, the implicit declaration will be identical foo()and nothing bad will happen.
, :
main.c
int main(void)
{
printf("%d\n", foo());
return 0;
}
, foo() 1 foo.c
foo.c
double foo()
{
return 3.5;
}
, ?
, , malloc() stdio.h, , .
, undefined 2 "Works" .
, , , c, c89.
++ , 't ++, , ( "" ) .
c - undefined, , , , , .
1 , ,
2 , double int , - undefined .