Skip to content
- area: Valid, as it is an identifier and doesn’t contain any illegal characters or reserved words.
- 5x: Invalid, as variables cannot start with a number.
- Sum: Valid, as it follows all rules for variable names.
- net pay: Invalid, as spaces are not allowed in variable names.
- float: Invalid, as
float
is a reserved keyword in C.
- age: Valid, as it follows the rules of naming and isn’t a reserved keyword.
- else: Invalid, as
else
is a reserved keyword in C.
- case: Invalid, as
case
is a reserved keyword.
- size22: Valid, as it follows the rules for naming and doesn’t contain illegal characters.
- my weight: Invalid, as spaces are not allowed in variable names.