which of the following variable name is incorrect
options
sum
interest paid
paid
roll no
Answers
Answered by
0
Answer:
intrest paid is the incrorrect
Answered by
0
interest paid and roll no are wrong variable names.
- Both interest paid and roll no have space (" ") which is a special character. Hence they're wrong identifiers.
Rules for naming identifier:
- Identifiers are case-sensitive.
- They should start with either _(underscore) or alphabets. Later can be followed with numbers, underscore and alphabets.
- Identifiers should only contains numbers and alphabets. Only special character allowed is _.
- Keywords of language cannot be used as identifier.
- Some compilers have restriction on length of identifiers.
- It is suggested to name meaningful identifiers according to the values they're storing which makes them easier to remember. This avoids confusion in making changes with variables. For example, use maxVal to store the maximum value in an array instead of a.
#SPJ3
Similar questions
Math,
4 months ago
Computer Science,
4 months ago
Economy,
8 months ago
English,
8 months ago
Art,
1 year ago