State with reasons why are the following variable names invalid;
a) For
b) book list
c) 2ndTerm
Answers
Answered by
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..
b.In variable name no spaces are allowed .
c.Variable name never start with a number ..
Mark me as brainliest ..thank you..
Answered by
2
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