12. Initialization & Declaration
• Int x=4;
• int y=2;
• Int z=40;
• Int z; //declaration
• z=40; //initialization
• Int x=4, y=2, z=40;
13. Sample Program
To find the sum of two numbers
#include<iostream>
#include<conio.h> // .h extension is used to show that it’s a header file
Using namespace std;
Int main()
{
Int x=5;
Int y=3; //can also be written as int x=5, y=3;
Int z;
z=x+y; // No need to write ‘int’ with z again!!
Cout<<“z”<<endl;
Cout<<z; //Note that commas (“ “) are not used here. Make sure you know what difference it will make!
_getch();
}