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
12 months agoTonja
12 months agoLuisa
1 years agoLynda
1 years agoLeatha
1 years agoDylan
1 years agoAbel
1 years agoFlo
1 years agoTish
1 years ago