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

CSE MCQs :: C++ - MCQs

  1. If we start our function call with default arguments means, what will be proceeding arguments?
  2. A.
    user argument
    B.
    empty arguments
    C.
    default arguments
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. What is the default return type of a function ?
  4. A.
    int
    B.
    void
    C.
    float
    D.
    char

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. Which header file is used to pass unknown number of arguments to function?
  6. A.
    stdlib.h
    B.
    string.h
    C.
    stdarg.h
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. How can you access the arguments that are manipulated in the function?
  8. A.
    va_list
    B.
    arg_list
    C.
    both a & b
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. What is the maximum number of arguments or parameters that can be present in one function call?
  10. A.
    64
    B.
    256
    C.
    255
    D.
    16

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. Which header file should you include if you are to develop a function that can accept variable number of arguments?
  12. A.
    varag.h
    B.
    stdlib.h
    C.
    stdio.h
    D.
    stdarg.h

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. What will initialize the list of arguments in stdarg.h header file?
  14. A.
    va_list
    B.
    va_start
    C.
    va_arg
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum