3

When I write a multi module program in c, i use header files for function prototypes and the like, connect things with #includes (using "" not <>), and when i come to compile I compile the .c files together:

gcc foo.c bar.c -o name

When i include stdlib.h for example, i do not need to compile a corresponding .c file. so where do the definitions of all the functions in stdlib come from? is there code in the header? do compilers treat <> headers specially? could I (theoretically) write a header which worked like stdio, stdlib, etc?

Alejandro Alcalde
  • 5,990
  • 6
  • 39
  • 79

0 Answers0