class X {
	public:
		int Xpublic;      // note that this a data member and not function
};

class Y : public X {
	public:
		int Ypublic;     // once again note that this is a data member
};

int main () {
	X *xptr = new Y;
	int i = xptr->Xpublic;   // line 1
	int j = xptr->Ypublic;   // line 2
}

// Which of the two assignments are allowed

 Click here for the answer