C knows the answer by deducing D is not yelling out the answer. 9 i/ f2 u- W) n1 T9 f/ e8 jThat means D is not sure the answer by seeing one white and one black., u0 c' p3 g9 ]" ~
C saw B is wearing the white, hence he is wearing the black
C, because he saw B's hat is white and he knows D can see the color of B's and his hat. If B and his hat has the same color, D would speak out. But D kept silent, so C knows that his hat's color must be different.