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

CSE MCQs :: C-MCQs

  1. Which of the following is true for static variable?
  2. A.
    It can be called from another function.
    B.
    It exists even after the function ends.
    C.
    It can be modified in another function by sending it as a parameter.
    D.
    All of the mentioned

  3. Assignment statements assigning value to local static variables are executed only once?
  4. A.
    true
    B.
    false
    C.
    Depends on the code
    D.
    None of the mentioned

  5. What is the format identifier for "static a = 20.5;?
  6. A.
    %s
    B.
    %d
    C.
    %f
    D.
    Illegal declaration due to absence of data type

  7. Functions have static qualifier for its declaration by default.
  8. A.
    true
    B.
    false
    C.
    Depends on the compiler
    D.
    Depends on the standard

  9. Is initialization mandatory for local static variables?
  10. A.
    YES
    B.
    NO
    C.
    Depends on the compiler
    D.
    Depends on the standard