After reading Christian Blatter's answer, thanks his method:
Given $\epsilon>0$ and $a\in\mathbb{Q}^c$,define:
$$Q_N:=\{\frac{k}{n}|1\leq n\leq N,1\leq k\leq n\}$$
Then $Q_N$ contains all rationals on $[0,1]$ with denominator $\leq N$. Then we define $\displaystyle \delta_N:=\inf_{x\in Q_N}|x-a|$,it is clear that $\delta_N$ is decreasing with $N$.
So, there exists $N_1$,such that $\delta_{N_1}<\frac{\epsilon}{2}$, and also there exists $N_2$ such that $\frac{1}{6N_2^2}<\frac{\epsilon}{2}$, then we choose $N=\max\{N_1,N_2\}$.
Now, choose rational $x=\frac{p}{q}$ for which $|x-a|<\delta_N$, by definition of $\delta_N$, we have $x\notin Q_N$,so $q>N$.
Then consider
$$
\begin{split}
|f(x)-f(a)|&=|p\sin{1 \over q}-a|\\
&\leq |p\sin{1 \over q}-{p\over q}|+|{p\over q}-a|\\
&\leq |{p\over {6q^3}}|+\delta_N\\
& \leq \frac{1}{6N^2}+\delta_N\\
&< \frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon
\end{split}
$$
So $f$ is continuous at all irrationals.
As for discontinuity, it is easy to find sequence that not converges to rationals.