• Header files store the definitions and rules for different built-in functions in the C program.
  • For example, printf(), scanf() functions are defined in stdio.h header file.
  • A header file is a file with extention .h which contains C function declarations and macro definitions to be shared between several source files.
  • There are two types of header file-files that a programmer writes and a file that comes with your compiler.
  • Every header file contains a set of predefined functions, which makes c programming simpler.
  • We should include the header file at the start of the program to be able to use the functions defined in the program.
  • When header files are added twice in a program, the compiler will process its contents twice.
  • This may cause an error when the compiler sees the same structure definition twice.

 

Categorized in: