78.1k views
4 votes
Which of the following is NOT a legal identifier?

outrageouslyAndShockinglyLongRunon

_42

_

lovePotionNumber9

7thheaven

User Ceebreenk
by
9.3k points

1 Answer

7 votes

Final answer:

The answer explains which identifier is not a legal identifier in programming languages.

Step-by-step explanation:

The legal identifiers in programming languages have specific naming rules. The identifier 'outrageouslyAndShockinglyLongRunon' is a valid identifier because it follows the rules of using letters, digits, and underscores, but it is not recommended due to its length. However, the identifier '_42' is also valid because it starts with an underscore followed by a digit, which is allowed. The identifiers 'lovePotionNumber9' and '7thheaven' are also valid as they consist of letters and digits only.

Therefore, the answer is '

outrageouslyAndShockinglyLongRunon

'.

User BC TUBE
by
7.9k points

No related questions found