5. C.

Take special triangles: $S$ with internal angles of $60^{\circ}$, $45^{\circ}$, and $75^{\circ}$, and $T$ with internal angles of $30^{\circ}$, $135^{\circ}$, and $15^{\circ}$.
It is clear that:
$$
\begin{array}{l}
\cos 60^{\circ}=\sin 30^{\circ}, \cos 45^{\circ}=\sin 135^{\circ}, \\
\cos 75^{\circ}=\sin 15^{\circ} .
\end{array}
$$

In this case, $S$ is an acute triangle, and $T$ is an obtuse triangle.
5. If the cosine values of the three interior angles of triangle $S$ are equal to the sine values of the three interior angles of triangle $T$, then ( ).
(A) Both $S$ and $T$ are acute triangles
(B) Both $S$ and $T$ are obtuse triangles
(C) $S$ is an acute triangle, and $T$ is an obtuse triangle
(D) $S$ is an obtuse triangle, and $T$ is an acute triangle