Question OOP-CTOR-0039
EasyWhat is the output of this code?
#include <iostream>
using namespace std;
struct A {
A() {}
A(const A&) { cout << "copy "; }
};
void f(A a) {}
int main() {
A x;
f(x);
cout << "done";
}
- A.
copy done
- B.
copy copy done
- C.
Sign up free to see the answer and a step-by-step explanation.