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

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.

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.

Introduction to Object Oriented Programming ( OOP )

Object-Oriented Programming Object Oriented programming is a programing model that is based upon data and object. Classes   Classes are the blueprint of objects. Now you will think about what actually blueprints are. Blueprints are actually a design or plan to build something. Let's take an example like the map is detail plan of house classes are detail plan in  Object-Oriented programming. let's give you an example of a class on java so that you can unferstand. public class Car {          int horsePower;     String name;     String color;      String Company; } public class Sample {     public static void main(String[] args) {         Car car;         Car mehran;             } } Class name always start with capital letters . It is a good practice to name classes .  We will later learn how this is good. So in the above class Car ...