State whether the following variables are valid or invalid give reason if invalid.
1. DateOfAdmission
2. 8ICSE
3. Ip address
4. _grandTotal
Answers
Answered by
1
Answer:
2nd and 4th variable names are invalid, first and 3rd are valid
Explanation:
the 2nd variable name i.e. 8ICSE starts with a number that is 8 and according to the rules a variable name can't start with a number.
the 4th variable name i.e. _grandTotal starts with an undescore ..a variable name also shouldn't start with special characters.
Similar questions