Home / CSE MCQs / C-MCQs :: Variable Names

CSE MCQs :: C-MCQs

  1. C99 standard guarantees uniqueness of ____ characters for internal names.
  2. A.
    31
    B.
    63
    C.
    12
    D.
    14

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. C99 standard guarantess uniqueness of _____ characters for external names.
  4. A.
    31
    B.
    6
    C.
    12
    D.
    14

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which of the following is not a valid variable name declaration?
  6. A.
    int __a3;
    B.
    int __3a;
    C.
    int __A3;
    D.
    None of the mentioned.

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Which of the following is not a valid variable name declaration?
  8. A.
    int _a3;
    B.
    int a_3;
    C.
    int 3_a;
    D.
    int _3a

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Variable names beginning with underscore is not encouraged. Why?
  10. A.
    It is not standardized
    B.
    To avoid conflicts since assemblers and loaders use such names
    C.
    To avoid conflicts since library routines use such names
    D.
    To avoid conflicts with environment variables of an operating system

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. All keywords in C are in?
  12. A.
    Lower Case letters
    B.
    Upper Case letters
    C.
    Camel Case letters
    D.
    None

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Variable name resolving (number of significant characters for uniqueness of variable) depends on?
  14. A.
    Compiler and linker implementations
    B.
    Assemblers and loaders implementations
    C.
    C Language
    D.
    None

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which of the following is not a valid C variable name?
  16. A.
    int number;
    B.
    float rate;
    C.
    int variable_count;
    D.
    int $main;

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which of the following is true for variable names in C?
  18. A.
    They can contain alphanumeric characters as well as special characters.
    B.
    It is not an error to declare a variable to be one of the keywords(like goto, static)
    C.
    Variable names cannot start with a digit.
    D.
    Variable can be of any length.

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. Which is valid C expression?
  20. A.
    int my_num = 100,000;
    B.
    int my_num = 100000;
    C.
    int my num = 1000;
    D.
    int $my_num = 10000;

    View Answer

    Workspace

    Discuss Discuss in Forum