Nepal's open education portal

EduNepalEduNepal
Objective1 markeasySolution

Which of the following is an invalid variable name in C?

  • A_salary
  • B1st_rank
  • Ctotal_sum
  • Dage2
C Programming

Verified Solution & Step-by-Step Explanation

solution · en · Verified by Editorial Board

Correct Answer: (b) 1st_rank

Explanation: In C identifier rules, variable names must begin with a letter (uppercase or lowercase) or an underscore (_). They cannot begin with a numeric digit. Therefore, 1st_rank violates C identifier syntax rules.