We are given $f(x)=\begin{cases}(x-1)^2\sin\left(\frac{1}{x-1}\right),&x\neq1\\\\0,&x=1\end{cases}$.
First check continuity at $x=1$.
For $x\neq1$,
$$-1\leq \sin\left(\frac{1}{x-1}\right)\leq1$$
Multiplying by $(x-1)^2\geq0$ gives
$$-(x-1)^2\leq (x-1)^2\sin\left(\frac{1}{x-1}\right)\leq (x-1)^2$$
As $x\to1$, both $-(x-1)^2$ and $(x-1)^2$ go to $0$.
So by the squeeze theorem,
$$\lim_{x\to1}f(x)=0=f(1)$$
Therefore, $f$ is continuous at $x=1$.
Now check differentiability at $x=1$ using the definition:
$$f'(1)=\lim_{x\to1}\frac{f(x)-f(1)}{x-1}$$
Since $f(1)=0$,
$$f'(1)=\lim_{x\to1}\frac{(x-1)^2\sin\left(\frac{1}{x-1}\right)}{x-1}$$
$$f'(1)=\lim_{x\to1}(x-1)\sin\left(\frac{1}{x-1}\right)$$
Again, since $\sin\left(\frac{1}{x-1}\right)$ is bounded between $-1$ and $1$,
$$-|x-1|\leq (x-1)\sin\left(\frac{1}{x-1}\right)\leq |x-1|$$
Both bounds go to $0$, so
$$f'(1)=0$$
Thus, $f$ is differentiable at $x=1$.
Now check whether $f'$ is continuous at $x=1$.
For $x\neq1$,
$$f'(x)=2(x-1)\sin\left(\frac{1}{x-1}\right)+(x-1)^2\cos\left(\frac{1}{x-1}\right)\left(-\frac{1}{(x-1)^2}\right)$$
$$\Rightarrow f'(x)=2(x-1)\sin\left(\frac{1}{x-1}\right)-\cos\left(\frac{1}{x-1}\right)$$
As $x\to1$, the first term $2(x-1)\sin\left(\frac{1}{x-1}\right)\to0$, but the second term $-\cos\left(\frac{1}{x-1}\right)$ keeps oscillating and has no limit.
Therefore, $\lim_{x\to1}f'(x)$ does not exist.
So $f$ is differentiable at $x=1$, but $f'$ is not continuous at $x=1$.
Answer: C.