Which code, inserted at line 10, generate the output "50"?
#include
using namespace std;
class Base {
int age;
public:
Base () {
age=5;
};
//insert code here
void Print() { cout << age;}
};
void setAge(Base &ob) {ob.age = 0;}
int main () {
Base a;
a.Print();
setAge(a);
a.Print();
return 0;
}
Tish
10 months agoTonja
10 months agoLuisa
10 months agoLynda
10 months agoLeatha
10 months agoDylan
10 months agoAbel
11 months agoFlo
11 months agoTish
12 months ago