(d) 3! × 5! × 4! × 3!
Let us consider all the books of same size as one entity. Now there are three different entities which have to be arranged on the shelf and this can be done is 3! ways.
Also the five large books can be arranged amongst themselves in 5! ways, four medium books can be arranged amongst themselves in 4! ways and the three small books can be arranged amongst themselves in 3! ways. So,
Required number of ways of arranging the books so that all same sized books are together = 3! × 5! × 4! × 3!