logo

Crowdly

Browser

Add to Chrome

What is the Expected Output class Person { private:     int age; publi...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What is the Expected Output

class Person {

private:

    int age;

public:

    Person(int a) {

        age = a;

    }

age = 25;

    void setAge(int age) {

        age = age;

    }

    void PrintAge() {

        cout << "Age: " << age << endl;

    }

};

int main() {

    Person Ahmed(20);

    Ahmed.setAge(25);

    Ahmed.PrintAge();

}

0%
More questions like this

Want instant access to all verified answers on lms.eng.asu.edu.eg?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome