Variable declaration and dynamic initialisation

variable declaration

DataType variable_name;
int age;

Dynamic initialisation of a variable

float radius=5.5;
float area=3.14*radius*radius; // here area dynamically initialized

Reference variable

It is an alternative name of other variable.
int a=100;
int &b = a;
Where b is called reference variable for the variable a, both the variable share same value.
© 2016 - 2022, All Rights are Reserved.