Q. Which of the following is a valid C++ identifier?

  • (A) 123variable
  • (B) variable_123
  • (C) @variable
  • (D) variable#123
πŸ’¬ Discuss
βœ… Correct Answer: (B) variable_123
Explanation: C++ identifiers can contain letters, digits, and underscores, but cannot begin with a digit.
Explanation by: Ranjeet
C++ identifiers can contain letters, digits, and underscores, but cannot begin with a digit.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
268
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Ranjeet
Publisher
πŸ“ˆ
98%
Success Rate