what are rules for defining a variable in c-c++?
c++
Collapse
X
-
1.The varirable name should not be the same asthe built in keywords.
2.It shoul not start with a numeric.
3.Some Compilers may allow you to declare a variable name with '_'(underscore)
as the first letter...
and many more like thisComment
-
while it is legal to declare variables and functions beginning with an underscore, it is discouraged to do so . . . these are typically reserved for compile macros and functions. they use an underscore so that there is no conflict with any variables you might declare. the underscore keeps things seperate.Comment
Comment