Which of the following is not a valid identifier?
My book
@book
_book
Book@
Answers
Answered by
4
An identifier is nothing but a name assigned to an element in a program. Example, name of a variable, function, etc. Identifiers are the user-defined names consisting of 'C' standard character set. As the name says, identifiers are used to identify a particular element in a program.
Answered by
6
Answer:
Here, the invalid identifier are,
- My book
- @book
- Book@
Valid identifier is - _book
Explanation:
- My name: Invalid as variable name cannot have spaces in between.
- @Book: Invalid as variable name must not contain any special character (except dollar $ and underscore _)
- Book@: Invalid for the same reason as above. Variable name must not contain any special character +except dollar $ and underscore _)
Similar questions
English,
1 month ago
English,
2 months ago
Social Sciences,
2 months ago
Computer Science,
9 months ago
English,
9 months ago