Which symbol can be used in variable name?
By BYJU'S Exam Prep
Updated on: September 25th, 2023
Which symbol can be used in variable name?
- * (asterisk)
- | (pipeline)
- – (hyphen)
- _ (underscore)
Answer: D. _ (underscore)
Table of content
Underscore ( _ ) symbol can be used in variable name.
Solution
In C programming, a variable name can consist of a combination of letters both in lower case and upper case, digits, or integer numbers, and only one special symbol underscore (_). A variable name may begin with a letter or an underscore. Other than underscore(_), no other special symbol can be used in a variable name.
Looking at the options, we can clearly eliminate A, B, and C. So the correct choice is option D.
☛ Related Questions: