You have to suppose $X\to C$ flat to avoid empty generic fiber.
Assume $X$ is regular and flat over $C$.
Then $\mathrm{Pic}(X)\to \mathrm{Pic}(X_K)$, where $K=k(C)$, is surjective. Indeed, identifying invertible sheaves (up to isomorphism) to Weil divisors (up to linear equivalence), it is enough to show that any point of codimension $1$ $P$ in $X_K$ extends to a divisor on $X$. It then suffices to take the Zariski closure of $\{ P\}$.
Now let us look at the exactness at middle. An element of $\mathrm{Pic}(X)$ is in the kernel of $\mathrm{Pic}(X)\to \mathrm{Pic}(X_K)$ if and only if it is represented by a Weil divisor on $X$ supported in finitely many closed fibers of $X\to C$:
(1) if $\mathcal L\in \mathrm{Pic}(X)$ is trivial on $X_K$, dividing by a rational section which is a basis on $X_K$, we can suppose that $\mathcal L$ is a subsheaf of $K(X)$ and equal to $O_X$ on an open subset $U$ containning $X_K$. So $\mathcal L=O_X(D)$ for some Cartier divisor $D$ supported in $X\setminus U$. As $F=f(X\setminus U)$ is constructible hence finite, $D$ is supported in $f^{-1}(F)$.
(2) Conversely, a divisor supported in a finite union of closed fibers is clearly trivial on $X_K$.
So the exactness at the middle is equivalent to saying that any vertical divisor is principal. Note that $f(X)$ is open in $C$ and $f(X)$ is regular because $X$ is regular and $X\to f(X)$ is faithfully flat. Now it is enough (and essentially necessary) to suppose the fibers of $X\to C$ are integral because every closed fiber $X_s$ is then a principal divisor (if $s\notin f(X)$, there is nothing to prove; if $s\in f(X)$, then $[s]$ is a principal divisor and so is $[X_s]=f^*[s]$).