Electronics and Communication Engineering - Microprocessors - Discussion

3. 

Consider the following rules for constructing variable names in C

  1. It can have alphabets, digits or underscores but no other special character.
  2. The maximum number of characters is 8.
  3. The first character may be an alphabet or digit but not underscore.
Which of the above are correct?

[A]. All
[B]. 1 and 2 only
[C]. 1 and 3 only
[D]. 2 and 3 only

Answer: Option B

Explanation:

First character must be alphabet only.


Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.