Skip to main content

Header Files

 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:
  1. 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.
  2. 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.
  3. Math.h: defines mathematical functions like sin (), cosine (), tan (), pow () and so on.
  4. 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


Popular posts from this blog

Comments in C

  Comment is the code which is not executable means compiler will not compile the comments and that’s why comments are not visible on output screen. Two types of Commenting: Type 1:  double slash ‘ // ’ method the whole statement after double slash is not executed by compiler Example: try to run below code its output will be blank screen #include <stdio.h> void main(){ // printf (“Hello World!”); } #include<stdio.h> void main ( ){ //Comments // Comment printf (“Hello World!”);//abc } #include<stdio.h> //Comments void main(){ //Comments printf(“Hello World”); } o/p:  blank screen O/p:  Hello World! O/p:  Hello World In this way you can give multiple comments anywhere in the program but double slash is used to  comment only single line for commenting multiple lines use type 2.  Type 2:  For multiline commenting or for commenting a whole paragraph from the program we have  to add /* at the start of comment and */ at the end of comment as shown in examples: #include <s

New trends and advantages of C language.

1. You can program the ROBOTS and  Automatic Running Machines  using C language. click here for more information.  2. For building more advanced  software or  Games you need to  learn more advanced languages like  Visual  Basic,  .NET, JAVA, ANDROID programming which is based on C.  3. To build a website you need only HTML and you can make your own website but for making it more advance you need to learn more web designing languages like CSS, JavaScript, Ajax, PHP and this all languages are very easy to learn if you have some basic knowledge about C. 4. After learning C you will be able to make your own software like Calculator, Games, Embedded Softwares, Compilers.