Home » C++ Programming » Pointers » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int function(int n, int m)
    {
    cout << n;
    cout << m;
    return 0;
    }
    int main(void)
    {
    int(*p)(char, int);
    p = function;
    function(11, 10);
    p(12, 13);
    return 0;
    }
    1. 11
    2. 10
    3. 12
    4. 13
    5. Compilation Error
Correct Option: E

In this program, we can’t do the casting from char to int, So it is raising an error.



Your comments will be displayed only after manual approval.