Question OOP-POLY-0064
HardWhat is the output of this code?
#include <iostream>
using namespace std;
void f(long x) { cout << "long "; }
void f(double x) { cout << "double "; }
void f(int *p) { cout << "ptr "; }
int main() {
f(5L);
f(5.0f);
f(nullptr);
}
- A.
Compilation error
- B.
long double ptr
- C.
Sign up free to see the answer and a step-by-step explanation.