Vidyalelo
C Programming · Q38

C Fundamentals

Programming · C Programming · question 38

Q38

A C variable cannot start with

A.
A number
B.
A special symbol other than underscore
C.
Both of the above
Answer
D.
An alphabet

Answer: Option C

Solution

Answer: Option C
Solution:
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.