Home / CSE MCQs / C-MCQs :: C Functions

CSE MCQs :: C-MCQs

  1. Automatic variables are allocated space in the form of a:
  2. A.
    stack
    B.
    queue
    C.
    priority queue
    D.
    random

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Which of the following is a storage specifier?
  4. A.
    enum
    B.
    union
    C.
    auto
    D.
    volatile

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Default storage class if not any is specified for a local variable, is auto:
  6. A.
    true
    B.
    false
    C.
    Depends on the standard
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Automatic variables are stored in:
  8. A.
    stack
    B.
    data segment
    C.
    register
    D.
    heap

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. What linkage does automatic variables have?
  10. A.
    Internal linkage
    B.
    External linkage
    C.
    No linkage
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. What is the output of this C code?

        int main()
        {
            auto i = 10;
            const auto int *p = &i;
            printf("%d\n", i);
        }
  12. A.
    10
    B.
    Compile time error
    C.
    Depends on the standard
    D.
    Depends on the compiler

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Automatic variables are variables that are?
  14. A.
    Declared within the scope of a block, usually a function
    B.
    Declared outside all functions
    C.
    Declared with auto keyword
    D.
    Declared within the keyword extern

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Automatic variables:
  16. A.
    Exist only within that scope in which it is declared
    B.
    Cease to exist after the block is exited
    C.
    Both (a) & (b)
    D.
    Only 1

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Automatic variables are allocated memory in?
  18. A.
    heap
    B.
    Data segment
    C.
    Code segment
    D.
    stack

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. What is the output of this C code?

        void main()
        {
            int x;
        }

     here x is?
  20. A.
    automatic variable
    B.
    static variable
    C.
    global variable
    D.
    register variable

    View Answer

    Workspace

    Discuss Discuss in Forum