Introduction


  1. Where can the default parameter be placed by the user?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    rightmost


  1. What will happen when we use void in argument passing?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    As void is not having any return value, it will not return the value to the caller.



  1. What is the output of this program?












  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    We have passed three values and it will manipulate according to the given condition and yield the result as 10 65


  1. If the user did not supply the value, what value will it take?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    If the user did not supply the value means, the compiler will take the given value in the argument list.



  1. What is the output of this program?
    #include 
    using namespace std;
    void function(int p, bool condition = true)
    {
    if (condition == true )
    {
    cout << "Condition is true. P = " << p;
    }
    else
    {
    cout << "Condition is false. P = " << p;
    }
    }
    int main()
    {
    function(250, false);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    In this program, we are passing the value, as it evaluates to false, it produces the output as following.