$8$ km in the first quarter of an hour, $6$ km in the second quarter and $16$ km in the third quarter.
Total distance $= 30$ km and total time $= 3/4$. $(1/4+1/4+1/4 = 3/4)$
$\text{Average speed} = \frac{\text{Total distance}}{\text{Total time}}$
$\quad \quad \quad = \frac{30}{3/4}=30\times (4/3)=40\; km/hr$
Correct Answer: $C$