☞Variable declaration involves specifying the type of the variable and giving it a name.
☞Example :
int a; //variable declaration
☞A variable may be initialized by assigning a specific value to it.
☞Initialization of a variable may take place in two ways:
1.Static Initialization 2.Dynamic Initialization
☞This process uses direct assignment of a constant to a defined variable (i.e. before its actual use in the programming logic).
☞The variable is initialized at the time of its declaration.
☞Example :
int a=0; //variable declaration & static initialization
☞When a variable get initialized at run time i.e. during the execution of program logic.
☞Under this situation a variable is assigned with the outcome of any arithmetical operation or logical function.
☞Example :
int a=8,b=5;
int c=a+b; //variable declaration & dynamic initialization