Question: Q 2 ) How many time the default constructor was called in this code when its executed? ` ` ` class A { public: int

Q2) How many time the default constructor was called in this code when its executed?
```
class A{
public: int x=3;
A(){cout"called
";}
}xa;~
int main(){
A();
A xb;
}
a)1
```
b)2
c)3
other
Q 2 ) How many time the default constructor was

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!