2
What will be the output of the program?
#include <iostream>
using namespace std;
class A {
int id;
public:
A(int i) : id(i) { cout << "C" << id; }
~A() { cout << "D" << id; }
};
int main() {
A a(1);
A b(2);
return 0;
}Medium