Computer Science, asked by Jean8624, 1 year ago

What are valid naming convention for variable

Answers

Answered by zaidghori1997
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:

  1. flag
  2. count
  3. num
  4. dig
  5. rem
  6. float_num
Similar questions