Suppose that $f$ is a real valued function such that its second derivative is discontinuous.Can you give some example?
The answers so far give differentiable functions that fail to have a second derivative at some point. If you want to second derivative to exist everywhere and be discontinous somewhere, you can use the following function:
$$f(x) = \int_0^x t^2 \sin(\frac1t)\ dt $$
Its first derivative is $x \mapsto x^2 \sin(\frac1x)$, which is differentiable everywhere, and while its derivative (and hence the second derivative of $f$) is defined everywhere, it is discontinuous at $0$. Therefore, $f$, $f'$ and $f''$ are defined everywhere, and $f''$ is discontinuous at $0$.
Start backwards: Take some function that is discontinuous, say a typical step function: $$ f''(x) = \begin{cases} 1 & x \le 0 \\ 2 & x > 0 \end{cases} $$ Integrate twice.