0
What is the output of the following C++ program?
#include <iostream>
using namespace std;
class C { public: static int n; C() { n++; } };
int C::n = 0;
int main() {
C a, b;
C *p = new C[3];
cout << C::n;
}- A2
- B5
- C4
- D3
Correct answer: B