Out of the following, which cannot be used as an identifier in C++?

2017

Out of the following, which cannot be used as an identifier in C++?

  1. A.

    Derived / Derived

  2. B.

    Class / Class

  3. C.

    Total / Total

  4. D.

    Name2 / Name2

Attempted by 284 students.

Show answer & explanation

Correct answer: B

Correct Answer: Class Explanation: In C++, keywords cannot be used as identifiers. “class” is a reserved keyword in C++.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs