Question: 1 . What will the following program display on the screen? #include Using namespace std; class Tank { private: int gallons; public: Tank ( )
What will the following program display on the screen?
#include
Using namespace std;
class Tank
private:
int gallons;
public:
Tank
gallons ;
Tankint gal
gallons gal;
int getGallons
return gallons;
;
int main
Tank storage;
for int index ; index ; index
cout storageindexgetGallons 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
