2. If the graph of the function $y=f(x)$ over the interval $[a, b]$ can be approximately regarded as a line segment, then when $c \in(a, b)$, the approximate value of $f(c)$ can be expressed as ( ).
(A) $\frac{f(a)+f(b)}{2}$
(B) $f\left(\frac{a+b}{2}\right)$
(C) $\frac{(b-c) f(a)+(c-a) f(b)}{(b-a)}$
(D) $f(a)-\frac{c-a}{b-a}[f(b)-f(a)]$