C Language MCQ - English
Which of the following is true for variable names in C?
They can contain alphanumeric characters as well as special characters
It is not an error to declare a variable to be one of the keywords(like goto, static)
Variable names cannot start with a digit
Variable can be of any length
Answer : C
View More Related Question
1) What is the problem in following variable declaration?
float 3Bedroom-Hall-Kitchen?;
The variable name begins with an integer
The special character ‘-‘
The special character ‘?’
All of the mentioned
View Answer
2) Which of the following is true for variable names in C?
They can contain alphanumeric characters as well as special characters
It is not an error to declare a variable to be one of the keywords(like goto, static)
Variable names cannot start with a digit
Variable can be of any length
View Answer
3) Which of the following is not a valid variable name declaration?
4) In case of ordinary int variables:
The leftmost bit is reserved for sign
The rightmost bit is reserved for sign
No bit is reserved for sign
None of the above
View Answer
5) Variable names beginning with underscore is not encouraged. Why?
It is not standardized
To avoid conflicts since assemblers and loaders use such names
To avoid conflicts since library routines use such names
To avoid conflicts with environment variables of an operating system
View Answer