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.

Balaji said:   1 decade ago
What is variable name why we use? what is keyword?

Sonam said:   1 decade ago
How compiler will know that int*p; is a pointer variable? Because in other way round variable name is not allowed to began with "*".


Post your comments here:

Your comments will be displayed after verification.