34.8k views
1 vote
Variable Labels:

Examine the following variable names for formatting errors.
If it is not usable, correct it. If there are no errors, write good.
10. studentName
11. Student Address
12.110 Room
13. parentContact
14. Teachers_name

1 Answer

5 votes

Answer:

10. 13. and 14. Correct

11. Incorrect

12. Incorrect.

Step-by-step explanation:

The programming language is not stated. However, in most programming languages; the rule for naming variables include:

  • Spacing not allowed
  • Underscore is allowed
  • Variable names cannot start with numbers

Using the above rules, we can state which is correct and which is not.

10. 13. and 14. Correct

11. Incorrect

Reason: Spacing not allowed

Correct form: StudentAddress

12. Incorrect.

Reason: Numbers can't start variable names

Correct form: Room110

User Najam
by
4.1k points