Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following 7 classes and a main function. What is printed to the console with the complete execution of main? class Hey { public:

Consider the following 7 classes and a main function. What is printed to the console with the complete execution of main?

class Hey { public: Hey() { cout << "!"; } ~Hey() { cout<<"~!"; } }; class Snap { public: Snap() { cout << "Snap "; } ~Snap() { cout << "~Snap "; } Hey hey[3]; }; Class Crackle { public: Crackle() { cout << "Crackle "; } ~Crackle() { cout << "~Crackle ";} }; class Pop { public: Pop() { cout << "Pop "; } ~Pop() { cout << "~Pop "; } }; class Rice : public Pop { public: Rice() { cout << "Rice "; } ~Rice() { cout << "~Rice "; } }; class Kris :public Crackle{ public: Kris() { cout << "Kris "; } ~Kris() { cout << "~Kris "; } Rice rice; }; class Pies : public Snap { public: Pies() { cout << "Pies "; } ~Pies() { cout << "~Pies "; } Kris kris; }; void main(){ Pies pies; cout << endl << "===" << endl; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions