Variable declaration in C++ by R4R Team

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




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!