Home » C++ Programming » Introduction » Question
  1. What is the output of this program?
    #include 
    #include
    using namespace std;
    int funcion(char ch,...);
    int main()
    {
    int p, q;
    p = funcion('B', 2, 3, 4);
    q = funcion('3', 2.0, 2, '3', 2.0f, 10);
    cout << p<<" " << q;
    return 0;
    }
    int funcion(char ch,...)
    {
    return ch;
    }
    1. 51 66
    2. 66 51
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: B

In this program, we are returning the ascii value of the character and printing it.



Your comments will be displayed only after manual approval.