What is variable in C++ ?
variable is something which have physical exitanvce in the memory which store real life value.
Syntax-
data_type variable_name=value(optional);
Example-
int n=10;
char s[30]="Mystring";
float f=3.14;
where,
int,char,float are the data_type in C++,
-There are many other data_type are also available in C++.
Valid variable_name:
-variable do not start with numbers or any special character.
-variable name should not same as keywords in C++
Example-
My_variable
var13
In-valid variable_name:
Example-
%er
234Var