Step 1: Differentiate the determinant
Only the first row has functions of $x$, so $f''(x)$ is the same determinant with the first row replaced by $2,\ -\sin x,\ e^x$.
Step 2: Substitute x = 0
The first row becomes $2,\ 0,\ 1$.
Step 3: Expand
$\begin{vmatrix}2&0&1\\2&1&-1\\p&p^2&1\end{vmatrix}=2(1+p^2)-0+1(2p^2-p)=4p^2-p+2$.
Final Answer:
$f''(0)=4p^2-p+2$.
\[ \boxed{\text{(C) }4p^{2}-p+2} \]