Question 21
EasyWhat is the output of this code?
#include <iostream>
using namespace std;
struct T {
char c;
T(char x) : c(x) { cout << c; }
~T() { cout << c; }
};
int main() {
T a('1');
T b('2');
}
- A.
12
- B.
1221
- C.
1212
- D.
2112
Sign up free to see the answer and a step-by-step explanation.