Header files are used to store the inbuilt functions that are available in C or C++. If we want to use those inbuilt functions in our program we have to include that particular header file at the beginning of the program. For performing mathematical functions like square root (sqrt), sin, cos etc. we have to include the header file math.h.
Eg: printf (), scanf () are stored in header file stdio.h