0
What is the output of the following C++ program?
#include <iostream>
using namespace std;
class V {
int x;
public:
V(int a) : x(a) {}
V operator+(const V& o) const { return V(x * 10 + o.x); }
int get() const { return x; }
};
int main() {
V a(2), b(3);
cout << (a + b).get() << " " << (a + b + a).get();
return 0;
}- A5 7
- B32 322
- C23 25
- D23 232
Correct answer: D