C language has numerous libraries that include predefined functions to make
programming easier. In C language, header files contain the set of predefined
standard library functions. Your request to use a header file in your program
by including it with the C preprocessing directive “#include”. All the header
file have a ‘.h’ an extension. By including a header file, we can use its
contents in our program.
C++ also offers its users a variety of functions, one of which is included in
header files. In C++, all the header files may or may not end with the “.h”
extension but in C, all the header files must necessarily end with the “.h”
extension.
A header file contains:
Function definitions
Data type definitions
Macros