class Demo public: Demo(){cout <"Constructor of Demo"< endl; ~Demo(){cout <"Destructor of Demo"< endl; void func()throw (MyException){ Demo d; cout <"Throw MyException in func()"<< endl; throw MyException("exception thrown by func ()")class Demo { public: Demo() { cout << "Constructor of Demo" << endl; } ~Demo() { cout << "Destructor of Demo" << endl; } }; void func() throw (MyException) { Demo d; cout << "Throw MyException in func()" << endl; throw MyException("exception thrown by func()"); } 10