Computer Science, asked by Rohan029273, 8 months ago

State with reasons why are the following variable names invalid;
a) For
b) book list
c) 2ndTerm​

Answers

Answered by jitenderRunning
1
a.For is a reserved word.It can’t be used as variable name.
b.In variable name no spaces are allowed .
c.Variable name never start with a number ..
Mark me as brainliest ..thank you..
Answered by aishi2020
2

Answers

1) FOR: As a rule a variable should not be a keyword, as 'for' is a keyword it is invalid

2) book list: As a rule no spaces should be used while writing variable. The name 'book list' contains space so it is invalid.

3) 2ndTerm: As a rule a variable must not begin with a digit that's why it is invalid.

Similar questions