2. From a point on a plane, draw $n$ rays, generating 42 angles, then $n=$. .
(A) 22
(B) 21
(C) 20
(D) 7
2. D.

Each pair of rays forms two angles, with a total of $n(n-1)$ ways to form angles, so $n(n-1)=42$. Rearranging gives
$$
n^{2}-n-42=0 \text {. }
$$

Solving the equation and taking the positive root, we get $n=7$.