Computer Science, asked by Yashgupta1016, 10 months ago

Which of the following is not a c variable?
a) count123
b) count_123
c) count @123
d)x_123_count

Answers

Answered by AskewTronics
0

Option c is the correct answer for the above question.

Explanation:

  • The variable is used to hold some value which can be used in another statement of the program. There are some rules which need to the user when he declaring the variable.
  1. The variables must not start with the number or any special symbols except underscore.
  2. The variable must not hold any special symbols except underscore.
  3. The variables need not hold any keyword.
  • Option c will not satisfy the above condition because it holds the special symbol (@), while the other option will satisfy. Hence option c can not be a variable for c language.

Learn More:

  • Variables : https://brainly.in/question/13427535
Answered by poojan
16

count@123 (Option C) is not considered as a variable in C.

Explanation:

To justify the answer, let us know the basic rules of variable declaration in C.

  • Rule 1: A variable can have letters in the English alphabet, digits, and underscore. No other special characters are allowed.
  • Rule 2: A variable name cannot be started with a number. It should always start with either a letter or an underscore.
  • Rule 3: Whitespace is not allowed within the variable name.
  • Rule 4: A variable name should never be any reserved word or keyword

So, as we see above, the third option i.e., count@123 fails to meet the rules of variable declaration (@ is a special character and any special characters other than an underscore are not allowed in C for variable declaration).

Therefore, count@123 (Option C) is not considered as a variable in C.

Learn more:

What is a variable in C?​

https://brainly.in/question/24413174

Global Variable Vs Local Variable

https://brainly.in/question/31763489

Similar questions