n-dimensional array reference of object x can only refer to instance of exactly n-dimensional array of object x (or subclass of x, since arrays are polymorphic) - period. In your case, cat instance cannot be assigned to cat reference and vice versa, and so on...
I am not understand array assignment from K&B Book on page 225 where they had given B) legal D) illegal
A, B, C, and D are all examples of "Illegal Array Reference Assignments," and underneath each one is an explanation of why they are illegal.
Unfortunately, there might be some confusion, because to the right of these examples is a "key" for the diagram that's above this. The key is just showing that a solid arrow in the diagram represents a legal reference, and a dashed arrow represents an illegal reference. Because of the way they're positioned, it might look like the "legal" arrow corresponds to options A and B, and the "illegal" arrow corresponds to options C and D. But there is no relation. A, B, C, and D are all illegal.
subject: Please explain me Array Reference Assignments for Multidimensional Array