Define $f(x)$ as the product of two real functions $f_1(x) = x, x \in$ R, and $f_2(x) =$ $ \begin{cases} sin \frac{1}{x} , & \text{If x $\ne $ 0} \\ 0, & \text{If x = 0} \end{cases}$
as follows :
$f(x) = \begin{cases} f_1(x).f_2(x) , & \text{If x $\ne $ 0} \\ \quad 0, & \text{If x = 0} \end{cases}$
$f(x)$ is continuous on R.
$f_1(x)$ and $f_2(x)$ are continuous on R.