0
is it compulsory to have no. 1 to 9 after _
identifier last paragraph
3 Antworten
+ 2
Rules for naming variables in C++ :
A variable name should be start with an alphabet or a underscore "_".
A variable name can have alphabets "a to z", "A to Z", numbers "0 to 9" and an underscore "_".
examples:
a
a1
_a
_1
_a1
a_1
a_11
a13
a16_
_3a
abc
_abc
_ab45
ab45
all of these are correct.
+ 1
not compulsory at all..
make sure you use identifiers that you remember easily cuz identifiers improves the code readability
char fn[10]
char ln[10]
these aren't the good method of declaring
instead use full name
char first_name[10]
char last_name[10]
and
avoid special characters.
+ 1
thanks