21. 

What will be the output of the following program?

#include<iostream.h> 
class IndiaBix
{
    int K; 
    public:
    void BixFunction(float, int , char);
    void BixFunction(float, char, char);
    
};
int main()
{
    IndiaBix objIB;
    objIB.BixFunction(15.09, 'A', char('A' + 'A'));
    return 0;
}
void IndiaBix::BixFunction(float, char y, char z)
{
    K = int(z);
    K = int(y);
    K = y + z;
    cout<< "K = " << K << endl; 
}

A. The program will print the output M = 130.
B. The program will print the output M = 195.
C. The program will print the output M = -21.
D. The program will print the output M = -61.
E. The program will report compile time error.

22. 

What will be the output of the following program?

#include<iostream.h> 
class TestDrive
{
    int x; 
    public:
    TestDrive(int xx)
    {
        x = xx;
    }
    int DriveIt(void);
};
int TestDrive::DriveIt(void)
{
    static int value = 0;
    int m;
    m = x % 2;
    x = x / 2;
    if((x / 2)) DriveIt(); 
    value = value + m * 10; 
    return value;
}
int main()
{
    TestDrive TD(1234);
    cout<< TD.DriveIt() * 10 << endl;
    return 0; 
}

A. 300
B. 200
C. Garbage value
D. 400

23. 

What will be the output of the following program?

#include<iostream.h> 
class IndiaBix
{
    int Num; 
    public:
    IndiaBix(int x)
    {
        Num = x;
    }
    int BixFunction(void);
};
int IndiaBix::BixFunction(void)
{
    static int Sum = 0; 
    int Dec;
    Dec = Num % 10; 
    Num = Num / 10; 
    if((Num / 100)) BixFunction(); 
    Sum  = Sum * 10 + Dec; 
    return Sum;
}
int main()
{
    IndiaBix objBix(12345);
    cout<< objBix.BixFunction();
    return 0; 
}

A. 123
B. 321
C. 345
D. 12345
E. 54321

24. 

What is correct about the following program?

#include<iostream.h> 
class Addition
{
    int x; 
    public: 
    Addition()
    {
        x = 0;
    }       
    Addition(int xx)
    {
        x = xx;
    }
    Addition operator + (int xx = 0)
    {
        Addition objTemp; 
        objTemp.x = x + xx; 
        return(objTemp);
    }
    void Display(void)
    {
        cout<< x << endl;
    }
};
int main()
{
    Addition objA(15), objB;
    objB = objA + 5;
    objB.Display();
    return 0; 
}

A. The program will print the output 20.
B. The program will report run time error.
C. The program will print the garbage value.
D. Compilation fails due to 'operator +' cannot have default arguments.

25. 

What will be the output of the following program?

#include<iostream.h> 
class AreaFinder
{
    float l, b, h; 
    float result; 
    public:
    AreaFinder(float hh = 0, float ll = 0, float bb = 0) 
    {
        l = ll; 
        b = bb; 
        h = hh;
    }
    void Display(int ll)
    {
        if(l = 0)
            result = 3.14f * h * h; 
        else
            result = l * b; 
        cout<< result; 
    }
};
int main()
{
    AreaFinder objAF(10, 10, 20);
    objAF.Display(0); 
    return 0; 
}

A. 0
B. 314
C. 314.0000
D. 200.0000