What is the output of the following C++ program?
#include <iostream>
struct T {
T() { std::cout << "D"; }
T(int) { std::cout << "I"; }
T(int, int) { std::cout << "II"; }
T(const T&) { std::cout << "C"; }
};
int main() {
T a;
T b(1);
T c{1, 2};
T d = b;
T e(d);
T f = 5;
std::cout << '\n';
return 0;
}
a: default (D), b: int (I), c: two ints (II), d and e: copy (C, C), f = 5: the non-explicit int constructor converts 5 (I).