1. Determine the output of each of the following program when it is executed. (a)
#include using namespace std; class abc {
public:
abc(); class x {
x();
class y{
y();
};
abc:: abc()
{
cout <>
}
abc::x :: x()
abc::x:: y:: y()
int main()
(b)
abc obj; return 0;
(c)
abc::x obj2; return 0;
#include using namespace std; union abc {
~abc(); union x {
~x(); union y {
~y(); union z {
~z();
abc:: ~abc()
abc::x :: ~x()
abc::x ::y :: ~y()
abc::x ::y :: z :: ~z()
abc obj1; abc::x obj2; abc::x::y obj3;
abc::x::y::z obj4; return 0;
(d)
~abc(); struct x {
~y(); struct z {
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here