0
Which of the following are vaild identifiers and why/why not? 1 data_rec,2 switch,3 1 data,4 xyz 1
6 Réponses
+ 12
data_rec is started with letter and contain only letter and underscore.
the rule is :
1. start with letter or underscore.
2. contain only letter, number or underscore.
+ 5
data_rec is valid.
switch is invalid (its a keyword)
1 data is invalid(contains special character (space) and starts with a number)
xyz 1 is invalid (space )
+ 2
its valid.
In names of identifiers,only alphabets ,numbers,_ and $ signs are allowed.
a number cant be first letter
0
what about data_rec reason
0
It is invalid as well: identifiers cannot contain spaces.
0
What will be
Data_rec
Reason