Sail E0 Webinar

MCQs

Total Questions : 16 | Page 1 of 2 pages
Question 1. Which of the following cannot be a variable name in C?
  1.    Volatile
  2.    True
  3.    friend
  4.    export
 Discuss Question
Answer: Option A. -> Volatile


volatile is C keyword.


Question 2. C99 standard guarantees uniqueness of ____ characters for internal names.
  1.    31
  2.    63
  3.    12
  4.    14
 Discuss Question
Answer: Option B. -> 63


ISO C99 compiler may consider only first 63 characters for internal.


Question 3. Which of the following is not a valid variable name declaration?
  1.    int __a3;
  2.    int __3a;
  3.    int __A3;
  4.    None of the mentioned.
 Discuss Question
Answer: Option D. -> None of the mentioned.


None.


Question 4. C99 standard guarantess uniqueness of _____ characters for external names.
  1.    31
  2.    6
  3.    12
  4.    14
 Discuss Question
Answer: Option A. -> 31


ISO C99 compiler may consider only first 31 characters for external
variables having 31 characters due to which it may not be unique.


Question 5. Which of the following is not a valid variable name declaration?
  1.    int _a3;
  2.    int a_3;
  3.    int 3_a;
  4.    int _3a
 Discuss Question
Answer: Option C. -> int 3_a;


Variable name cannot start with a digit.


Question 6. Variable names beginning with underscore is not encouraged. Why?
  1.    It is not standardized
  2.    To avoid conflicts since assemblers and loaders use such names
  3.    To avoid conflicts since library routines use such names
  4.    To avoid conflicts with environment variables of an operating system
 Discuss Question
Answer: Option C. -> To avoid conflicts since library routines use such names


None.


Question 7. All keywords in C are in?
  1.    Lower Case letters
  2.    Upper Case letters
  3.    Camel Case letters
  4.    None
 Discuss Question
Answer: Option A. -> Lower Case letters


None.


Question 8. Which of the following is not a valid C variable name?
  1.    int number;
  2.    float rate;
  3.    int variable_count;
  4.    int $main;
 Discuss Question
Answer: Option D. -> int $main;


Since only underscore and no other special character is allowed in a variable name, it results in an error.


Question 9. Which of the following is true for variable names in C?
  1.    They can contain alphanumeric characters as well as special characters.
  2.    It is not an error to declare a variable to be one of the keywords(like goto, static)
  3.    Variable names cannot start with a digit.
  4.    Variable can be of any length.
 Discuss Question
Answer: Option C. -> Variable names cannot start with a digit.


According to the syntax for C variable name, it cannot start with a digit.


Question 10. Variable name resolving (number of significant characters for uniqueness of variable) depends on?
  1.    Compiler and linker implementations
  2.    Assemblers and loaders implementations
  3.    C Language
  4.    None
 Discuss Question
Answer: Option A. -> Compiler and linker implementations


It depends on the standard to which compiler and linkers are adhering to.


Latest Videos

Latest Test Papers