Home » C++ Programming » Overloading » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    void function(int n)
    {
    cout << n<<" ";
    }
    void function(double m)
    {
    cout << m;
    }
    int main(void)
    {
    function(10);
    function(50.36);
    return 0;
    }
    1. 10 50.36
    2. 50.36 10
    3. 10 50
    4. All of above
    5. None of these
Correct Option: A

In this program, we are printing the values and the values will be print(10) will be printed first because of the order of the execution.



Your comments will be displayed only after manual approval.