The function in which the conditions of Rolle's theorem are satisfied, is
(A) $f(x)=2 x^{3}+x^{2}-4 x-2,[-\operatorname{root} 2$, root 2$]$
(B) tanx in $[0, \pi]$
(C) $f(x)=\left\{\begin{array}{l}x^{2}+1 ; 0 \leq x \leq 1 \\ 3-x ; 1 \leq x \leq 2\end{array}\right.$
(D) None of these