C Programming - Declarations and Initializations - Discussion

Discussion Forum : Declarations and Initializations - General Questions (Q.No. 3)
3.
Which of the following special symbol allowed in a variable name?
* (asterisk)
| (pipeline)
- (hyphen)
_ (underscore)
Answer: Option
Explanation:

Variable names in C are made up of letters (upper and lower case) and digits. The underscore character ("_") is also permitted. Names must not begin with a digit.

Examples of valid (but not very descriptive) C variable names:
=> foo
=> Bar
=> BAZ
=> foo_bar
=> _foo42
=> _
=> QuUx

Discussion:
42 comments Page 5 of 5.

Ashwini said:   9 years ago
Yes '$' also allowed.

Swetha said:   9 years ago
Yes @Samuel.


Post your comments here:

Your comments will be displayed after verification.