Examveda

What will be the output of the following C++ code?
#include <iostream>
using namespace std;
ostream & operator<<(ostream & i, int n)
{
    return i;
}
int main()
{
    cout << 5 << endl;
    cin.get();
    return 0;
}

A. 5

B. 6

C. error

D. runtime error

Answer: Option C


Join The Discussion

Related Questions on Classes and Objects in C plus plus