Which of the following is a valid variable name in C?

Options

  • A. 2value
  • B. float
  • C. total_marks
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

C. total_marks

Detailed Explanation

Correct Answer: C — total_marks.

Explanation: In C, an identifier cannot start with a digit and cannot be a reserved keyword. The name total_marks starts with a letter and contains a valid underscore. The name float is a reserved keyword.