Skip to main content

Variable And INT

#include<iostream>     // it is  a library used for display
#include<conio.h>      // its is also a library used for input output statement
using namespace std;

main()

{
int a;  
                        /* what is (int) here and what is (a) here
                   the two question which was in mind of me
                   when i was in first semester*/
                 

}

/* Here there are two thing

2) int

1) a:
is basically a Variable which represent a storage or memory in computer

like if we define (int a) then a memory is located in computer to store
the value of a
it can be changed during execution of program but i will define it later

2) int

2) INT :
int basically specifies the type of data that can be stord
in it Each variable is declared by its types
like
i)int =  can hold integers like 22 is an integer so it will be good to
store it in (int)

ii) float= can store float values like 22.5 22.1 or every float value

iii) char = can store character like A to Z values
 There are 5 data type but main are above
 Hope this question will not be ariesed in your mind now
 */
  

Comments

Popular posts from this blog

Cin function

#include<iostream>     // it is  a library used for display #include<conio.h>      // its is also a library used for input output statement using namespace std; main() { int a,b; // two variable are taken as a and b cout<<"enter a value "<<endl; /* as you know cout is used to print out your comment enclosed in " " this                              endl is used for next line */ cin>>a;        /* here is new thing "cin" it is used to input values on running time of program*/ cout<<"enter a value "<<endl; /* as you know cout is used to print out your comment enclosed in " " this                              endl is used for next line */ cin>>b;        /* here is new thing "cin" it is used t...

Age Calculator

#include<iostream>     // it is  a library used for display #include<conio.h>      // its is also a library used for input output statement using namespace std; main() { int age;           // age variable with datatype int long int age_month; /* long is also a datatype but it can hold more bigger data then int                      so variable age_month with datatype long */ char name[50];     // char is datatype with variable name name it can only hold character like " naveed" cout<<"Enter name of person:"<<endl; // will output Comment "enter the name of person cin>>name;                   //here is input object through which you can enter the name of person cout<<"enter the age of person in year:"<<endl; // here its output the comment "enter the age " cin...