What is the output of this program include using namespace

What is the output of this program # include using namespace std; class myclass {public: int who; myclass(int id); DiacriticalTilde myclass();}glo_ob(100); myclass::myclass(int id) {cout NestedLessLess endl; cout NestedLessLess \"Constructor, Initializing an obj. with id = \" NestedLessLess id NestedLessLess \"; who = \" NestedLessLess id NestedLessLess endl; who = id;} myclass:: DiacriticalTilde myclass() {cout NestedLessLess endl; cout NestedLessLess \"Destructor, Destructing the object where who = \" NestedLessLess who NestedLessLess endl;} void f() {myclass local_ob3(300);} int main() {cout NestedLessLess \"\ enter main\" NestedLessLess endl; myclass local_obl(300); f(); myclass local_ob2(400); cout NestedLessLess \"\ leaving main\"NestedLessLess endl; return 0;}

Solution

enter main

Constructor, Initializing an obj. with id = ;who = 300

Constructor, Initializing an obj. with id = ;who = 300

Destructor, Destructing the object where who = 300

Constructor, Initializing an obj. with id = ;who = 400

leaving main

Destructor, Destructing the object where who = 400

Destructor, Destructing the object where who = 300

 What is the output of this program # include using namespace std; class myclass {public: int who; myclass(int id); DiacriticalTilde myclass();}glo_ob(100); myc

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site