C plus plus programming
June 3, 2026 1 min read

Variable Declaration, Dynamic Initialization, and Reference Variables in C++

HS
HEMANT SINGH
Technical Writer & Educator

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.

In this category