Answer: (D) (d)
Concept: Total internal reflection happens when light goes from a denser to a rarer medium and meets the surface at an angle of incidence greater than the critical angle. Then no light is refracted out: all of it is reflected back into the denser medium, obeying the laws of reflection.
Step 1 — Condition on the media.
The ray is totally reflected, so A must be optically denser than B.
Step 2 — Condition on the angle.
The angle of incidence must be more than C, so i > C. Only (d) has both.

Why the other options are wrong:
- (A) (a): (a) has i < C and A rarer than B; the ray simply refracts into B.
- (B) (b): (b) has i = C, where the ray grazes along the boundary (r = 90°); it is not yet totally reflected.
- (C) (c): (c) has A rarer than B; the ray bends towards the normal and always enters B, however large i is.
Therefore, i > C and A optically denser than B, option (D).