Correct option is C
abc_123 is a correctly formatted variable name in most programming languages. It follows common naming rules, such as starting with a letter and using an underscore, which is generally allowed.
Important Key Points:
1. Variable names in most programming languages must
start with a letter or an underscore.
2.
Underscores (_) are often allowed in variable names to improve readability.
3. Numbers can be used in variable names, but they
cannot be at the beginning.
Knowledge Booster:
·
123abc: This is
not allowed as a variable name because it
starts with a number, which violates most naming rules.
·
abc!123: The character ! is
not allowed in variable names in most languages because it is a special symbol often used for logical operations.
·
abc-123: The character - is
not permitted in variable names since it is interpreted as the
subtraction operator in programming.
·
abc 123: Spaces are
not allowed in variable names, as they create ambiguity. Instead, underscores (_) are commonly used for separation in variable names.