6. 

What will be the output of the following program?

#include<iostream.h> 
class India
{
    public:
    struct Bix
    {
        int   x;
        float y;
        void Function(void)
        {
            y = x = (x = 4*4); 
            y = --y * y;
        }
        void Display()
        {
            cout<< y << endl;
        } 
    }B; 
}I; 
int main()
{
    I.B.Display(); 
    return 0;
}

A. 0
B. 1
C. -1
D. Garbage value

7. 

What will be the output of the following program?

#include<iostream.h>
#include<string.h> 
class IndiaBix
{
    int val; 
    public:
    void SetValue(char *str1, char *str2)
    {
        val = strcspn(str1, str2);
    }
    void ShowValue()
    {
        cout<< val;
    } 
};
int main() 
{
    IndiaBix objBix;
    objBix.SetValue((char*)"India", (char*)"Bix"); 
    objBix.ShowValue(); 
    return 0; 
}

A. 2
B. 3
C. 5
D. 8

8. 

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

#include<iostream.h>
#include<string.h> 
class IndiaBix
{
    public:
    void GetData(char *s, int x, int y )
    {
        int i = 0;
        for (i = x-1; y>0; i++)
        {
            cout<< s[i];
            y--; 
        } 
    }
}; 
int main()
{
    IndiaBix objBix;
    objBix.GetData((char*)"Welcome!", 1, 3);
    return 0; 
}

A. The program will print the output me!.
B. The program will print the output Wel.
C. The program will print the output !em.
D. The program will print the output Welcome!.
E. The program will result in a compile time error.

9. 

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

#include<iostream.h> 
class BixData
{
    int x, y, z; 
    public:
    BixData(int xx, int yy, int zz)
    {
        x = ++xx;
        y = ++yy;
        z = ++zz;
    }
    void Show()
    {
        cout<< "" << x++ << " " << y++ << " " << z++;
    } 
}; 
int main()
{
    BixData objData(1, 2, 3);
    objData.Show();
    return 0; 
}

A. The program will print the output 1 2 3.
B. The program will print the output 2 3 4 .
C. The program will print the output 4 5 6.
D. The program will report compile time error.

10. 

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

#include<iostream.h> 
class IndiaBix
{
    int x; 
    float y; 
    public:
    void Function()
    {
        x = 4; 
        y = 2.50; delete this;
    }
    void Display()
    {
        cout<< x << " " << y;
    } 
}; 
int main()
{
    IndiaBix *pBix = new IndiaBix();
    pBix->Function(); 
    pBix->Function(); 
    pBix->Display(); 
    return 0; 
}

A. The program will print the output 4 2.5.
B. The program will print the output 4.
C. The program will report runtime error.
D. The program will report compile time error.