Question: What is the output of the following program? #include using namespace std; class Mountain { public: double get _ height ( ) const; Mountain (
What is the output of the following program?
#include
using namespace std;
class Mountain
public:
double getheight const;
Mountain;
Mountaindouble newheight;
private:
double height;
;
Mountain::Mountain
height ;
Mountain::Mountaindouble newheight
height newheight;
double Mountain::getheight const
return height;
int main
Mountain cth;
Mountain cth;
double totalheight ;
totalheight cthgetheight cthgetheight;
cout totalheight endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
