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
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q18: In C++,inheritance has much to do with
Q19: When class D is derived from class
Q20: If class D is derived from class
Q21: Which of the following is correct syntax
Q22: Suppose class Child is derived from class
Q24: Suppose class Child is derived from class
Q25: In the code for HourlyEmployee that is
Q26: What are the benefits of inheritance and
Q27: When a derived class inherits from a
Q28: Suppose class Child is derived from class
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents