Difficulty: Easy
Correct Answer: else
Explanation:
Introduction:
In C programming, identifiers (variable, function, and type names) must follow strict lexical rules. A common beginner trap is attempting to use a reserved keyword as a variable name. This question checks understanding of C's identifier syntax and the reserved keyword set.
Given Data / Assumptions:
Concept / Approach:
C identifiers must start with a letter or underscore and then may contain letters, digits, or underscores. However, no identifier may be a reserved keyword. Keywords have fixed meanings to the compiler and cannot be redefined as variable names. The token 'else' is a control-flow keyword paired with 'if' and 'else if' constructs, so it cannot be repurposed as an identifier.
Step-by-Step Solution:
Verification / Alternative check:
Compilers will emit a syntax error if you attempt int else = 5; because the parser expects the keyword 'else' to follow an 'if' statement, not to declare an object.
Why Other Options Are Wrong:
'coal' – not a keyword; valid identifier.
'ram' – not a keyword; valid identifier (despite being a common acronym).
'vendy' – not a keyword; valid identifier.
Common Pitfalls:
Confusing natural-language words with keywords; assuming case-insensitive matching (C is case-sensitive; 'Else' would be valid, though discouraged). Avoid shadowing and pick descriptive names even when valid.
Final Answer:
else
Discussion & Comments