Question OOP-POLY-0042
MediumWhat is the output of this code?
#include <iostream>
using namespace std;
void f(int x) { cout << "int "; }
void f(double x) { cout << "double "; }
void f(char x) { cout << "char "; }
int main() {
f(5);
f(5.0);
f('5');
}
- A.
int double char
- B.
double double char
- C.
Sign up free to see the answer and a step-by-step explanation.