Examveda

A C variable cannot start with

A. A number

B. A special symbol other than underscore

C. Both of the above

D. An alphabet

Answer: Option C

Solution (By Examveda Team)

In C programming, variable names must adhere to specific rules regarding their initial characters. A C variable cannot start with the following:

A Number:
Variable names in C must begin with a letter (a-z, A-Z) or an underscore (_). They cannot start with a digit (0-9). For example, 1variable is not a valid variable name.

A Special Symbol Other Than Underscore:
Variable names cannot start with special symbols like @, #, $, etc., other than the underscore (_). For example, @variable is not a valid variable name.

Option D: An Alphabet:
This option is incorrect because variables can start with an alphabet (a-z, A-Z) or an underscore (_).

Therefore, the correct answer is Option C: Both of the above as variable names cannot start with a number or a special symbol other than an underscore.

This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Comments (7)

  1. Sajib Bosu
    Sajib Bosu:
    4 years ago

    "&" sign is also a special symbol, so only ans should be option A

  2. Faisal Jutt
    Faisal Jutt:
    5 years ago

    Both a & b

  3. Chitty 6666
    Chitty 6666:
    6 years ago

    I think B is only correct one

  4. Khadar Haji
    Khadar Haji:
    6 years ago

    Both

  5. Venkataramana R
    Venkataramana R:
    8 years ago

    We can have %3d naa

  6. Mujtaba Hassan
    Mujtaba Hassan:
    8 years ago

    (option c ) not a nor b

  7. Shyama Sundar
    Shyama Sundar:
    9 years ago

    option a

Related Questions on C Fundamentals