aslam u alikum everyone.
in the previous post i introduction about DIV c++ and guide that how to download it and install it from google,and show his interface . now we are try to used Div c++ with header file using.
So lets start:
header files:
header files contains different type of predefined function. it is the collection of different standard libraries function to execute different task. now we talk on its extension. the extension of the these header file is .h . syntax that are used for main header file in C++ are these.the main header file started with INCLUDE word.
in every program these header file must be used.
so next i defined about different types of variable that are used in program.
there are different types of data types that are used in program.
1= int
2=char
3=float
4=string
int Data types;
we talk about int data type , first question is what is int data type and why int data type is used.
int data type is numeric value with no decimal point or function. we can used both positive and negative value in this data type. int data type is used to store integer value. it takes two or four bytes in memory depending on the computer
float data types:
float data type is used to stored real value. it take four byes in memory . real data type is numeric value with decimal point.
char data type is used to store character value . it take 1 byte in memory it is used to indicate or represent letter, number etc
i hope u understand very well that what is header files and data types.
now we write a small code using one data types.and try to know about COUT & CIN command.
these are correct header files for all program .
Cout command is used to show data in the screen . when we used cout command then data will be printed on screen.
and getch(); command is used to terminate the program.
now i compile the program and trying to shown how it work.
so we can see that out Cout command work and our program run successfully and out is showing on output screen.