[A] Which of the following are invalid variable names and why?
1. B’day : “Invalid variable” because no special symbol other than an underscore (as in
gross_sal) can be used in a variable name.
2. int : “ Invalid variable” because the keywords cannot be used as variable names because if we
do so, we are trying to assign a new meaning to the keyword, which is not allowed. Some C
compilers allow you to construct variable names that exactly resemble the keywords. However, it
would be safer not to mix up the variable names and the keywords.
3. $hello : “Invalid variable” because no special symbol other than an underscore (as in gross_sal)
can be used in a variable name.
4. #HASH : “Invalid variable” because no special symbol other than an underscore (as in
gross_sal) can be used in a variable name.
5. dot. : “Invalid variable” because no special symbol other than an underscore (as in gross_sal)
can be used in a variable name.
6. number : “Valid variable.”
7. totalarea _main() : Invalid variable because no special symbol other than an underscore (as in
gross_sal) can be used in a variable name. It contains parentheses brackets
9. temp_in_Deg : Valid variable.
10. total% : Invalid variable because no special symbol other than an underscore (as in gross_sal)
can be used in a variable name.
11. 1st : Invalid variable because the first character in the variable name must be an alphabet or
underscore (_).
12. stack-queue : Invalid variable because no special symbol other than an underscore (as in
gross_sal) can be used in a variable name. Here “-” is special symbol.
13. variable name : Invalid variable because white spaces are not allowed in rule of defining
variables.
14. %name% : Invalid variable because no special symbol other than an underscore (as in
gross_sal) can be used in a variable name.
15. salary : Valid variable.
[B] Which of the following are invalid C constants and why?