4. Let $a=0.123456789101112 \cdots 998999$, where the digits are obtained by writing down the positive integers from 1 to 999 in sequence. Then the 2007th digit to the right of the decimal point is ( ).
(A) 0
(B) 4
(C) 5
(D) 6
4.C.
1 to 9 includes 9 digits; $10 \sim 99$ includes $2 \times 90=180$ digits; $100 \sim 999$ includes $3 \times 900=2700$ digits.

Since $2007-9-180=1818$, and $\frac{1818}{3}=606$, the 2007th digit is the 3rd digit of the 606th three-digit number 705, which is 5.