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)]$
2. (C).

Idea 1: Find the equation of the line passing through the points $(a, f(a)),(b, f(b))$
$$
f(x)=f(a)+\frac{f(b)-f(a)}{b-a}(x-a) .
$$

Substitute $x=c$ to get (C).
Idea 2: By the section formula, we have
$$
\left\{\begin{array}{l}
c=\frac{a+\lambda b}{1+\lambda}, \\
f(c)=\frac{f(a)+\lambda f(b)}{1+\lambda} .
\end{array}\right.
$$

Solving (1) for $\lambda=\frac{c-a}{b-c}>0$, and substituting into (2) yields (C).