Q.1.

Which of the following statement is correct?

Q.2.

A constructor that accepts __________ parameters is called the default constructor.

Q.3.

Which of the following statement is correct?

Q.4.

To ensure that every object in the array receives a destructor call, always delete memory allocated as an array with operator __________ .

Q.5.

Which of the following statement is correct about constructors?

Q.6.

Destructor calls are made in which order of the corresponding constructor calls?

Q.7.

Which of the following statement is correct?

Q.8.

A __________ is a constructor that either has no parameters, or if it has parameters, all the parameters have default values.

Q.9.

How many default constructors per class are possible?

Q.10.

Which of the following statement is correct about the program given below?

#include<iostream.h> 
class IndiaBix
{
    int *p; 
    public:
    IndiaBix(int xx, char ch)
    {
        p  = new int(); 
        *p = xx + int(ch); 
        cout<< *p;
    }
    ~IndiaBix() 
    {
        delete p;
    }
};
int main()
{
    IndiaBix objBix('B'); 
    return}
Q.11.

Which of the following statement is correct about the program given below?

#include<iostream.h> 
class IndiaBix
{
    int x; 
    public:
    IndiaBix(short ss)
    {
        cout<< "Short" << endl;
    }
    IndiaBix(int xx)
    {
        cout<< "Int" << endl;
    }
    IndiaBix(char ch)
    {
        cout<< "Char" << endl;
    }
    ~IndiaBix() 
    {
        cout<< "Final";
    }
};
int main()
{
    IndiaBix *ptr = new IndiaBix('B');
    return
}
Q.12.

What will be the out of the following program?

#include<iostream.h> 
class BixBase
{
    protected:
    int x, y; 
    public:
    BixBase(int xx =int yy =    {
        x = xx;
        y = yy; 
    } 
    void Show()
    {
        cout<< x * this->y << endl;
    }
};
class BixDerived
{
    private:
        BixBase objBase; 
    public:
    BixDerived(int xx, int yy) : objBase(xx, yy)
    {
        objBase.Show();
    } 
    ~BixDerived()
    { }
};
int main()
{
    BixDerived objDev(20); 
    return}
Q.13.

What will be the output of the following program?

#include<iostream.h> 
class IndiaBix
{
    int x; 
    public:
    IndiaBix(int xx, float yy)
    {
        cout<< char(yy);
    } 
}; 
int main()
{
    IndiaBix *p = new IndiaBix(99.50f);
    return
}
Q.14.

Which of the following constructor is used in the program given below?

#include<iostream.h> 
class IndiaBix
{
    int x, y; 
    public:
    IndiaBix(int xx =int yy =)
    {
        x = xx; 
        y = yy;
    }
    void Display()
    {
        cout<< x << " " << y << endl;
    } 
    ~IndiaBix()
    { } 
};
int main()
{
    IndiaBix objBix; 
    objBix.Display(); 
    return}
Q.15.

Which of the following statement is correct about the program given below?

#include<iostream.h> 
class IndiaBix
{
    int x; 
    public:
    IndiaBix(short ss)
    {
        cout<< "Short" << endl;
    }
    IndiaBix(int xx)
    {
        cout<< "Int" << endl;
    }
    IndiaBix(float ff)
    {
        cout<< "Float" << endl;
    }
    ~IndiaBix() 
    {
        cout<< "Final";
    }
};
int main()
{
    IndiaBix *ptr = new IndiaBix('B');
    return
}
Q.16.

Which of the following statement is correct about the program given below?

#include<iostream.h> 
class IndiaBix
{
    int x; 
    public:
        IndiaBix()
        {
           x =        }
        IndiaBix(int xx)
        {
            x = xx; 
        }
        IndiaBix(IndiaBix &objB)
        {
            x = objB.x; 
        }
        void Display()
        {
            cout<< x << " ";
        }
};
int main()
{
    IndiaBix objA(25);
    IndiaBix objB(objA);
    IndiaBix objC = objA;
    objA.Display();
    objB.Display();
    objC.Display();
    return
}
Q.17.

Which of the following statement is correct about the program given below?

#include<iostream.h> 
class IndiaBix
{
    public:
    IndiaBix()
    {
        cout<< "India";
    }
    ~IndiaBix()
    {
        cout<< "Bix";
    }
};
int main()
{
    IndiaBix objBix;
    return
}
Q.18.

What will be the output of the following program?

#include<iostream.h>
class BixBase
{   
    public:
    BixBase()
    {
        cout<< "Base OK. "; 
    }
};
class BixDerived: public BixBase
{
    public:
    BixDerived()
    { 
        cout<< "Derived OK. "; 
    }
    ~BixDerived()
    { 
        cout<< "Derived DEL. "; 
    }
};
int main()
{
    BixBase    objB;
    BixDerived objD;
    objD.~BixDerived();
    return}
Q.19.

What will be the output of the following program?

#include<iostream.h>
class BixBase
{   
    public:
    BixBase()
    {
        cout<< "Base OK. "; 
    }
    ~BixBase()
    {
        cout<< "Base DEL. "; 
    }
};
class BixDerived: public BixBase
{
    public:
    BixDerived()
    { 
        cout<< "Derived OK. "; 
    }
    ~BixDerived()
    { 
        cout<< "Derived DEL. "; 
    }
};
int main()
{
    BixBase *basePtr = new BixDerived();
    delete basePtr;
    return}
Q.20.

Which of the following statement is correct about the program given below?

#include<iostream.h> 
class IndiaBix
{
    int x, y; 
    public:
        IndiaBix()
        {
            x =            y =
        }
        IndiaBix(int xx, int yy)
        {
            x = xx;
            y = yy; 
        }
        IndiaBix(IndiaBix *objB)
        {
            x = objB->x;
            y = objB->y; 
        }
        void Display()
        {
            cout<< x << " " << y;
        }
};
int main()
{
    IndiaBix objBix( new IndiaBix();
    objBix.Display();
    return
}