/**  working with user defined header files in C  **/

for creating a user defined header file , we have to write the functions and we have to save that file with ‘ .h ‘ extension. let us see with a small example program , which helps in understanding the defining and using a user defined header files.we are opening a c file and writing the following code
And we are saving this file as sam.h  ( .h extension is used to represent header files)
and we are opening a new file and writing the following code as given below:

Output :



A user can define not only his own functions but also  his own Header Files and can use in any program just by including the user defined Header File as shown in the example program above.