Which of these is a valid variable name in C?
Correct answer
B. total_marks
12 views
B. total_marks
12 views
A variable name cannot start with a digit, cannot contain spaces or special symbols like @. "total_marks" uses an underscore and starts with a letter, so it is valid. "2ndValue" starts with a digit, which is not allowed.
Asked in: Matric,FBISE
Not sure why the answer is B? Ask here and get an explanation.