Explanation & Hints:
In most programming languages, variable names must adhere to specific rules. Typically, these rules include:
- The name must start with a letter (uppercase or lowercase) or an underscore (
_ ).
- The name can only contain letters, digits, and underscores.
Given these rules, let’s evaluate the provided identifiers:
- 0_: This is an invalid variable name because it starts with a digit.
- 0: This is a valid variable name. It starts with an underscore and contains only letters and underscores.
- _0: This is a valid variable name. It starts with an underscore and contains only letters and underscores.
- ___: This is a valid variable name. It starts with an underscore and contains only underscores.
So, the invalid variable name is 0_. |