What will the following
#include <iostream>
using namespace std;
class Sky
{
public:
Sky ()
{ cout ≪ “Entering the sky.\n"; }
∼Sky()
{ cout ≪ "Leaving the sky.\n"; }
};
class Ground : public Sky
{
public:
Ground()
{ cout ≪ "Entering the Ground.\n"; }
∼Ground()
{ cout ≪ "Leaving the Ground.\n"; }
int main()
{
}
Ground object;
return 0;
Want to see the full answer?
Check out a sample textbook solutionChapter 15 Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Additional Engineering Textbook Solutions
Concepts Of Programming Languages
Introduction To Programming Using Visual Basic (11th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out With Visual Basic (7th Edition)
Java How To Program (Early Objects)
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)