Classify the following into valid or invalid identifiers. If invalid state the
reason :
a) Avg mark
b) marklist
c) 5thname
d) $abc
e) else
f) name.list
Answers
Answered by
1
Explanation:
a. no. because identifiers should have single word and no special characters should be given
" " (space) is also a special character
b. yes.
c. no. identifier should begin with alphabet and character '_'. should not begin with number
d. no. identifier should not begin with special characters
e. no. it is a keyword. keywords cannot be used as identifier
f. no. here '.' is special character. hence not a valid identifier
Similar questions