Follow these rules while naming variables:
- Variable names must begin with a letter or underscore (
_). - Only alphanumeric characters and underscores are allowed.
- Keywords like
int, float, or return cannot be used. - Variable names are case-sensitive (
age and Age are different).
Example of Valid Names:
age, _salary, number1
Example of Invalid Names:
1age (starts with a digit), float (reserved keyword)