141k views
1 vote
Which of the following are valid variable names? Select 2 options.

A. Cost$4
B. 4thNumber
C. Fourth_number
D. Num4
E. $4cost
Please answer asap

1 Answer

5 votes

Answer:

The answer to this question is given below in the explanation section.

Step-by-step explanation:

The correct options to this question are C and D:

  • Fourth_number
  • Num4

Because these are the correct and valid variable names.

Other options are not correct because these variables names either start with a number or contains special character such as $ sign.

The invalid variables are A, B, and E while the valid variable declare are options C and D.

User Luke Ehresman
by
5.1k points