Functions

Q1: Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    int x; 
    float y; 
    public:
    void AptitudeFunction(int = 0, float = 0.00f, char = 'A');
    void AptitudeFunction(float, int = 10.00, char = 'Z');
    void AptitudeFunction(char, char, char);
};
int main()
{
    AptitudeCrack objAptitude;
    objAptitude.AptitudeFunction(10 * 1.0, int(56.0)); 
    return 0;
}
void AptitudeCrack::AptitudeFunction(int xx, float yy, char zz)
{
    x = xx + int(yy);
    cout<< 'x = ' << x << endl;
}
void AptitudeCrack::AptitudeFunction(float xx, int yy, char zz)
{
    x = zz + zz;
    y = xx + yy;
    cout<< ' x = ' << x << endl;
}
void AptitudeCrack::AptitudeFunction(char xx, char yy, char zz)
{
    x = xx + yy + zz; 
    y = float(xx * 2); 
    cout<< ' x = ' << x << endl;
}

A The program will print the output x = 180.

B The program will print the output x = 65.

C The program will print the output x = 130.

D The program will not compile successfully.

E The program will print the output x = 66.

ANS:D - The program will print the output x = 180.

No answer description is available. Let's discuss.



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.