Which of the following identifiers is invalid
A. printname
B. enum
C. writername
D. papername
Answer: Option B
Solution (By Examveda Team)
Identifiers are names given to variables, functions, classes, etc., in programming languages.Valid identifiers can include letters (a-z, A-Z), digits (0-9), and underscores (_), but they cannot start with a digit.
Option A: printname - This is a valid identifier as it follows the rules.
Option B: enum - This is an invalid identifier because enum is a reserved keyword in many programming languages (e.g., C, C++, Java, Python). Keywords cannot be used as identifiers.
Option C: writername - This is a valid identifier as it follows the rules.
Option D: papername - This is a valid identifier as it follows the rules.
Therefore, the correct answer is Option B: enum.
Related User Ask Questions
Which of the following is not a primary function of a Bank?
A. Granting Loans
B. Collecting Cheques/Drafts customers
C. Facilitating import of goods
D. Issuing Bank Drafts
A. Regulatory jurisdictional fight between SEBI and IRDA
B. They don’t offer better tax benefits
C. They offer lesser returns compared to traditional insurance policies
D. All of the above
The Chameli Devi Jain Award is given for an outstanding woman ____?
A. Scientist
B. Reporter
C. Player
D. Teacher

Join The Discussion