47.7k views
5 votes
Which of the following is true?

a. Identifiers cannot be named with a name that startswith a $.

b. Identifiers cannot be named with a name that startswith a digit.

c. Identifiers cannot be named with a name that startswith a _.

d. Identifiers cannot be named with a name that startswith a $.

1 Answer

4 votes

Answer:

Only c is False rest of them are True.

Step-by-step explanation:

Identifier is a name given to a variable,function,class etc.

Following are the properties of an Identifiers :-

  1. They are combination of lower case (a-z) and upper case (A-Z) and digits(0-9) and underscore(_).
  2. It cannot start with a digit.
  3. It cannot use special symbols .
  4. they can be of any length.
  5. Keywords cannot be used as an Identifier.

So all of them are matching these properties of identifier except option option C.

User Charlesliam
by
5.4k points