Header files in the program are included before main ( ) function between < > after writing #include as shown in above examples #include <stdio.h> is written. All header files are present in compiler if you are using TurboC then you can see this in INCLUDE folder “C:\TurboC++\Disk\TurboC3\INCLUDE” there are so many header files are present this are named along with .h. in chapter header files we will see how to create your own header file.
Examples of header files: stdio.h, conio.h, math.h, graphics.h, string.h, io.h, malloc.h and so on. You don’t need to memorize all header files basically in this book we are going to use only 4-5 header files.
“A header file is a file with extension .h which contains C function declarations and macro
definitions and to be shared between several source files. “
Let’s see in short some header files:
- stdio.h: It means Standard Input Output (stdio) header file in which output function printf () is defined and scanf () for getting input from user. Like just like that there are so many functions are defined.
- Conio.h: It means Console Input / Output (con Io) header file in which the functions like clrscr() use for clear output screen and getch () to hold output screen up to get one input from keyboard. And getche () to hold output screen after get one input from keyboard.
- Math.h: defines mathematical functions like sin (), cosine (), tan (), pow () and so on.
- Graphics.h: For graphics functions for antinational functions, there are some functions to draw circle, ellipse, line, rectangle, to colour screen on output screen. We will see this in chapter C Graphics
Comments
Post a Comment