0
what are the legal variable in c++
4 Antworten
+ 2
Fan is a valid variable name considering Pascal's case.Check it out.
+ 1
Variable name should not be c++'s language term such as
for,while, public, exit, friend and others
do not use special character like @#$!
do not use first character of a variable name as number like 3var.
however you can use var3
variable value should be that variable type such as
int is integer type that means 4,5,78,3... integers only. You cannot add character or string or float type.
c++ is strongly typed language. Use variables value accordingly, else ready to get an error.
0
1. Name3_var
2. Salary
- 2
Valid
x
asdfgh
ase12a
ahah_hhgg
Invalid
1dsg
&ahsh
&₹@
killer lion
Fan