2. Given that the domain of the function $f(x)$ is $\mathbf{R}$. If $f(x+1)$ and $f(x-1)$ are both odd functions, then $(\quad)$.
(A) $f(x)$ is an even function
(B) $f(x)$ is an odd function
(C) $f(x+3)$ is an odd function
(D) $f(x+3)$ is an even function
2. C.

Since $f(x+1)$ is an odd function, we have
$$
\begin{array}{l}
f(x+1)=-f(-x+1), \\
f(x)=-f(-x+2) .
\end{array}
$$

Similarly, since $f(x-1)$ is an odd function, we get
$$
f(x)=-f(-x-2) \text {. }
$$

From equations (1) and (2), we have
$$
f(-x+2)=f(-x-2) \text {. }
$$

Thus, $f(x+2)=f(x-2), f(x+4)=f(x)$.
Therefore, $f(x)$ is a periodic function with a period of 4.
Since $f(x-1)$ is an odd function, then $f(x+3)$ is also an odd function.