Objects and Classes - Programming

Q1:

What will be the output of the following program?
#include<iostream.h> 
class AptitudeBase
{
    public:
        float x; 
}; 
class AptitudeDerived : public AptitudeBase
{
    public: 
        char ch; 
        void Process()
        {
            ch = (int)((x=12.0)/3.0);
        }
        void Display()
        {
            cout<< (int)ch;
        } 
}; 
int main()
{
    class AptitudeDerived  *objDev = new AptitudeDerived;
    objDev->Process();
    objDev->Display();
    return 0; 
}

A The program will print the output 4.

B The program will print the ASCII value of 4.

C The program will print the output 0.

D The program will print the output garbage.

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

No answer description is available. Let's discuss.