31.6k views
0 votes
Question 10

Which of the following variable names does NOT match the C syntax?
myextremelylongvariablename
MyVariable
4 Variable
M_y Var1ab13

2 Answers

4 votes

Answer:

The answer is "4 Variable and M_y Var1ab13"

Explanation:

Defining a variable in C language we follow some rules that can be described as:

  • The variable name contains a digit, alphabets, underscore.
  • We can define variable in case sensitive manner.
  • There we don't use any spaces or special characters.

In the question, there are first and second option follows the rule and option third and fourth does not follow the rule.

User Nilanka Manoj
by
6.2k points
1 vote

Answer:

4 Variable

Step-by-step explanation:

This is the variable that is not acceptable in C syntax. The reason is that, in c syntax, Variable name must not be started with a digit.

In Option 3 variable name is started with the digit that is the reason this is not applicable in C.

User Merrimack
by
6.1k points