Variable in C
Format
DataType variableName;or with default value
DataType variableName = defaultValue;- The variable
mustdefine before we using it. - The variable
must end with;.
Data Type
int, number without decimalfloat, number with decimalchar, stringbool, true or false
INFO
For char we need use "" to wrap the data.
Example
c
// int, default value is 12
int age = 12;
float pi = 3.142;
char c = "sajsdj";
bool d;
d = false;