Subscribe Us

Library function - Header file - Types of header file in C - smartduniya

I will teach you guys about hash ( # ) include directive and header files. If you have learn part of basic structure of c program, you might have remembered. I once brought up a word called header file while explaining the link section.

header file in c

What is Libary Function ? 

So this post is specifically made for header files. So let's begin now. Look, when ever we write a c program, we define some of our own function depending on what we need our program to do and many other functions are stored in c library which are called library function and their functionality is predefined.

What is Header file ?

Library functions are categorically grouped into different files known as header files and if we want to use those function we must tell compiler about those files to be accessed. This can be achieved by using preprocessor directive hash include as I have shown here .

How many types of Header file ?

You can see here, the syntax for an inclusion of header file is hash include less than bracket followed by file name is again followed by greater than bracket.For example,  If I need to include < stdio.h > which  stands for a standard input/ output which means it holds the definition of a standard input/output function, I would write it for the inclusion of header file  < stdio.h > like this hash include less than stdio.h greater than bracket.

So the most frequently used function whose definition this <stdio.h>  holds are scanf () and printf (). Some other header files are <string.h> <math.h> etc.  So whenever we need to use some of the string function we must include this header file and whenever we need to use some of the mathematical function we need to use <math.h> header file in the program . We need to include this <math.h> header file in the link section. So in the next post of mine you will learn  guys how to use printf () function to print output to the output console.

Hope you understand if you face any problem comment below ,will try to help you.

 

Don’t forget to Subscribe our Blog to get update. Just put your email on subscribe box and hit subscribe button , next verify your email , it will be done.

You will get every single post when we will upload in Smartduniya.



How to write comment in C ?

How to write keyword, identifires in C ?

How to write Printf() function in C ?

Post a Comment

0 Comments