5. For a convex $n$-sided polygon, if circles are constructed with each side as the diameter, the convex $n$-sided polygon must be covered by these $n$ circles. Then the maximum value of $n$ is: ( ).
(A) 3 .
(B) 4 .
(C) 5 .
(D) Greater than 5 .
5. (B).

In any triangle, if a perpendicular is drawn from the vertex of the largest angle to the opposite side, then the circles with the two smaller sides as diameters can cover the entire triangle.

For any convex quadrilateral $ABCD$, if circles are constructed with each side as a diameter, then these four circles can certainly cover the entire quadrilateral. We use proof by contradiction. Suppose there is a point $P$ inside the convex quadrilateral that is not covered by any of the four circles, then $\angle APB, \angle BPC, \angle CPD, \angle DPA$ are all less than $90^{\circ}$, which contradicts $\angle APB + \angle BPC + \angle CPD + \angle DPA = 360^{\circ}$.

When $n \geqslant 5$, in a regular $n$-sided polygon, the ratio of the apothem to the radius of the circle (i.e., half the side length) is $\frac{\cos \frac{\pi}{n}}{\sin \frac{\pi}{n}} > 1$. Therefore, the circles with each side as a diameter cannot cover the center of the regular $n$-sided polygon. Hence, the maximum value of $n$ is 4.