LearnFrenzy
Sign in Take a free test

Declarations and Initializations · Declarations MCQ · Question 5

Which special symbol is allowed in a C variable name? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 5 Back to Exercise

Which special symbol may appear in a variable name?

  • A - (hyphen)
  • B _ (underscore) Correct
  • C $ (dollar)
  • D @ (at)
Correct Answer: Option B

Standard C identifiers consist of letters, digits and the underscore, not starting with a digit. Some compilers accept $ as an extension, but it is not portable.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links