Skip to main content

Header files


        Header files or Libraries (as they are commonly known as) extends the Languages's functionality..C Language supports only the most basic features that it needs.C language does not even contain functions to read from the keyboard and write to the screen. such extended functionalities are written by programmers and are placed in Header files which are reusable.Header files help you to split up your program into modules.


How to include header files in your program? (only for beginner level)
      The statement you always write in your c program at the beggining.
 yaa.. you are actully including the header files.

we use preprocessor directives or commands which starts with #.
syntax :   #include<header file name . h>

why we include header files such as stdio and conio? (conio not for linux)
stdio.h:
Most of the C input/output functions are defined in stdio.h.It is a part of the Standard C Library
refer the header file for the list of available functions.the most commonly used are printf,scanf.
conio.h:
conio.h is a C header file used in MS-DOS compilers for performing "console input and output" from a program.It is not a part of the Standard C library.Compilers that target non-DOS operating systems, such as Linux,Win32 do not support this header file.
beside these, the Standard C Library contains a large number of functions for tasks like string handling, mathematical computations, input/output processing, memory allocation and several other operating system services.
If you are using turbo c++ compiler you can see the header files with the function present in that header file in help section.
Here I m providing small list of usefull header files.

math.h   it provides many useful functions such as cos,sin...,log,mod,pow etc.
string.h  it provides many string handling functions to compare,concatenate strings,to find their length
                we will see this deeply later on.
malloc/calloc for allocating memories and for memory manegment functions.
stdlib.h  this header file has variety of different methods.
In short we use header files so that we can use in-built functions.
In further sections, We'll see how to create your own header files.Till then enjoy using the in-built ones.

Comments

Popular posts from this blog

Computer Buses

Computer Buses   A computer system consists of different devices.CPU must be able to communicate with all devices. The devices are connected together by a communications channel called bus. A bus consists of a set of communication lines or wires. It is used to move a large amount of bits in the form of electrical pulses from one unit to another. The bus is used to connect the following units: Central Processing Unit Control Unit  Arithmetic and Logic Unit Main Memory ( RAM, ROM) Input / Output Devices Bus is a common path to transfer data and commands between CPU, memory and input / output devices.It is also used to send or receive data from secondary storage.The capacity of a bus depends on the number of data lines in it.A bus with 16 lines can carry 16 bits or 2 bytes at a time. A bus with 32 lines can carry 32 bits or 4 bytes at a time . Types Of  Buses Different types of buses are as follows: 1. Data Bus 2.Addres...

Steps of splitting pdf files

Goto https://www.ilovepdf.com/split_pdf Click on Select PDF File. Upload your pdf file here. Select Extract Pages from right menu. Click on Split pdf button and wait for the procedure. Now Click on Download Split PDF and you will get a zip file in which there will be separate pdf.

Steps to remove google accounts from Computer

Open Google . You will see a round shaped picture of google account picture in top right corner as marked in below picture Click on it. Click on sign out of all accounts Click on Sign In at the top right corner as shown in picture below. Click on it. You will see following screen. Select your desired account from it and sign in . Reopen your form by clicking link provided to you, It will be open now.