Variable -
A variable is a name that denotes a storage area used to store a data value that can be changed by our program.
Variable declaration rules -
1- They must not start with a digit.
2- Uppercase and lowercase are treated as unique.
3- We can not declare the keyword as a variable.
4- We can not use white space.
5- Variable names can be of any length.
Initialization of variables -
string stringVar = "Hello World!!";
int intVar = 100;
float floatVar = 10.2f;
char charVar = 'A';
bool boolVar = true;
It specifies the size and type of values that can be stored in variable. There are 2 types of data type.


No comments:
Post a Comment