我在C写"hello world"程序.
void main()
{ printf("Hello World"); }
// note that I haven't included any header file
Run Code Online (Sandbox Code Playgroud)
该程序编译时带有警告
vikram@vikram-Studio-XPS-1645:~$ gcc hello.c
hello.c: In function ‘main’:
hello.c:2:2: warning: incompatible implicit declaration of built-in function ‘printf’
vikram@vikram-Studio-XPS-1645:~$ ./a.out
Hello Worldvikram@vikram-Studio-XPS-1645:~$
Run Code Online (Sandbox Code Playgroud)
这怎么可能?操作系统如何在不包含任何标题的情况下链接库?