When variables are declared initial, values can be assigned to them in two ways:
- Within a Type declaration
The value is assigned at the declaration time.
For example,
int a = 10;
float b = 0.4 e –5;
char c = ‘a’; - Using Assignment statement
The values are assigned just after the declarations are made.
For example,
a = 10;
b = 0.4 e –5;
c = ‘a’;