218k views
5 votes
1.6.1: Identifier validator. Check if the following identifiers are valid: c, cat, n1m1, short1, _hello, 42c, hi there, and cat! (Note: Doesn't consider library items.)

User Pidhorskyi
by
5.7k points

1 Answer

4 votes

Answer:

correct option c, cat, n1m1, short1,

Step-by-step explanation:

correct option c, cat, n1m1, short1,

The variable is used to store the value of the value varies during the program execution...

some of the basic rules of identifier

  • The variable must be started with the alphabet
  • We cannot declare the variable name as keyword i.e "that value is already defined and in the compiler"
  • Variable-length does not exceed 8 characters
  • We cannot use space to declared any variable
  • _hello,42C, hi there and cat! are not follow the basic rule of identifier so they are not identifier validator
User Toco
by
5.5k points