I was trying to simultaneously compile the following C files
file1.c
#include<stdio.h>
int main()
{
foo();
return 0;
}
file2.c
#include<stdio.h>
void foo()
{
printf("Hello");
}
I compiled the two files using the following command in linux gcc file1.c file2.c -o file
It compiled successfully without any warnings and on running it gave the output as 'Hello' Shouldn't file1.c require a prototype like void foo(). Is there anything in the C standard regarding this ?