Objects and Classes - Programming

Q1:

What will be the output of the following program?
#include<iostream.h> 
class Aptitude
{
    public:
      int x;
};
int main()
{
    Aptitude *p = new Aptitude();

    (*p).x = 10;
    cout<< (*p).x << ' ' << p->x << ' ' ;

    p->x = 20;
    cout<< (*p).x << ' ' << p->x ;

    return 0;
}

A 10 10 20 20

B Garbage garbage 20 20

C 10 10 Garbage garbage

D Garbage garbage Garbage garbage

ANS:A - 10 10 20 20

No answer description is available. Let's discuss.