Functions

Q1: Which of the following statement is correct about the program given below?
#include<iostream.h> 
static int Result;
class India
{
    public:
    void Change(int x = 10, int y = 20, int z = 30)
    {
        cout<< x + y + z;
    }
    void Display(int x = 40, float y = 50.00)
    {
        Result = x % x; 
        cout<< Result;
    }
};
class Aptitude
{
    int x, y; 
    public:
    void Change(int x, int y = 50)
    {
        cout<< x + y;
    }
};
class AptitudeCrack: public India, public Aptitude
{
    public:
    void Display(int x = 10, int xx = 100, int xxx = 1000)
    {
        Result = x + xx % x * x;
        cout<< Result ; 
    }
};
int main()
{
    AptitudeCrack objAptitude;
    objAptitude.India::Display(10, 20.00);
    return 0; 
}

A The program will print the output 0.

B The program will print the output 40.

C The program will print the output 30.

D The program will report compile time error.

E The program will print the output 10.


img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.