Functions - Programming

Q1:

Which of the following statement is correct about the program given below?
#include<iostream.h> 
class AptitudeCrack
{
    int x; 
    float y; 
    public:
    AptitudeCrack(int x)
    {
        x = x;
    }
    AptitudeCrack(int p = 0, int q = 10)
    {
        x = p += 2; 
        y = q * 1.0f;
    }
    void SetValue(int &y, float z)
    {
        x = y;
        y = (int)z;
    }
    void Display(void)
    {
        cout<< x;
    }
};
int main()
{
    int val = 12; 
    AptitudeCrack objAptitude(val); 
    AptitudeCrack objTmp();
    objAptitude.SetValue(val, 3.14f); 
    objAptitude.Display(); 
    return 0; 
}

A The program will print the output 2.

B The program will print the output 12.

C The program will report run time error.

D The program will not compile successfully.

ANS:A - The program will print the output 2.

No answer description is available. Let's discuss.