4. The area of the figure enclosed by the curve determined by the equation $|x-1|+|y-1|=1$ is ().
(A) 4
(B) $\pi$
(C) 2
(D) 1
4. Solution From the original equation, we get
$$
0 \leqslant|x-1| \leqslant 1,0 \leqslant|y-1| \leqslant 1 \text {, }
$$

which means $0 \leqslant x \leqslant 2,0 \leqslant y \leqslant 2$.
When $\left\{\begin{array}{l}0 \leqslant x \leqslant 1 \\ 0 \leqslant y \leqslant 1\end{array}\right.$, we have $x+y=1$.
When $\left\{\begin{array}{l}0 \leqslant x \leqslant 1 \\ 1<y \leqslant 2\end{array}\right.$, we have $y-x=1$.
When $\left\{\begin{array}{l}1<x \leqslant 2 \\ 0 \leqslant y \leqslant 1\end{array}\right.$, we have $x-y=1$.
When $\left\{\begin{array}{l}1<x \leqslant 2 \\ 1<y \leqslant 2\end{array}\right.$, we have $x+y=3$.
These four line segments form a square with side length $\sqrt{2}$, and its area is 2.
Choose C.