What are valid naming convention for variable
Answers
Answered by
1
It should begin with a lower case letters and it is preferred if all the letters are lowered cases and the name should mean something or at least indicate the purpose it is used for. Avoid using single letters and use underscore if you need a space. These are basic and important conventions. There are other "rules" too like: a keywords cannot be used as identifiers but that's just common knowledge.
Examples of some variables:
- flag
- count
- num
- dig
- rem
- float_num
Similar questions