Essay
Given the class below,tell to what value the default constructor initializes the data member.Name this initialization technique and give another way to write the constructor.
class A
{
public:
A();
private:
int a;
};
A::A(): a(17)
{
//deliberately empty
}
Correct Answer:

Verified
This is a base (or member)init...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q3: If B is a public base class
Q4: A programmer can use inheritance with an
Q5: In C++,inheritance has much to do with
Q6: If class D is derived from class
Q7: We can assign a base class object
Q9: Constructors are inherited.After all something has to
Q10: When a derived class inherits from a
Q11: Suppose class Child is derived from class
Q12: If a base class constructor is not
Q13: If a class B is a pubic