2. If the lengths of the two legs of a right triangle are $a, b$, and the length of the hypotenuse is $c$, and the altitude to the hypotenuse is $h$, then ( ).
(A) $a b=h^{2}$
(B) $a^{2}+b^{2}=2 h^{2}$
(C) $\frac{1}{a^{2}}+\frac{1}{b^{2}}=\frac{1}{h^{2}}$
(D) $\frac{1}{a}+\frac{1}{b}=\frac{1}{h}$
2.C.

It is known that $ab > h^2$, $a^2 + b^2 > h^2 + h^2 = 2h^2$, $\frac{1}{2}(a+b)h > \frac{1}{2}ch = \frac{1}{2}ab$, therefore, (A), (B), and (D) are incorrect.
Furthermore, from $\frac{1}{2} \sqrt{a^2 + b^2} h = \frac{1}{2} ab$, we can derive $\frac{1}{a^2} + \frac{1}{b^2} = \frac{1}{h^2}$.