That is not at all what the prof is asking for. He wants the space for any one of three subclasses allocated with malloc. The screwy thing is, the poor programmer has to figure out how much space that is. The base class is "sym". Look again how that is being used. He allocates all the memory for object and assigns it directly to the base class pointer -- not to data members of the base class.
Again, there are legitimate reasons to do this, but by the time you get there the programmer-in-training better know what non-static member functions and POD types are.
I can only assume that the prof is using this to illustrate some point.