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

CSE MCQs :: C++ - MCQs

  1. To which does the function pointer point to?
  2. A.
    variable
    B.
    constants
    C.
    function
    D.
    absolute variables

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. What we will not do with function pointers?
  4. A.
    allocation of memory
    B.
    de-allocation of memory
    C.
    both a & b
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. What is the default calling convention for a compiler in c++?
  6. A.
    __cdecl
    B.
    __stdcall
    C.
    __pascal
    D.
    __fastcall

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. What are the mandatory part to present in function pointers?
  8. A.
    &
    B.
    retrun values
    C.
    data types
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. which of the following can be passed in function pointers?
  10. A.
    variables
    B.
    data types
    C.
    functions
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. What is meaning of following declaration? int(*ptr[5])();
  12. A.
    ptr is pointer to function.
    B.
    ptr is array of pointer to function.
    C.
    ptr is pointer to such function which return type is array.
    D.
    ptr is pointer to array of function.

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. If the user didn't supply the user value means, then what value will it take?
  14. A.
    default value
    B.
    rise an error
    C.
    both a & b
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Where does the default parameter can be placed by the user?
  16. A.
    leftmost
    B.
    rightmost
    C.
    both a & b
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. Which value will it take when both user and default values are given?
  18. A.
    user value
    B.
    default value
    C.
    custom value
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. What we can't place followed by the non-default arguments?
  20. A.
    trailing arguments
    B.
    default arguments
    C.
    both a & b
    D.
    none of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum