2. Let the sets be
$$
A=\{1,2, \cdots, 6\}, B=\{4,5,6,7\} \text {. }
$$

Then the number of sets $S$ that satisfy $S \subseteq A$ and $S \cap B \neq \varnothing$ is ( ).
(A) 57
(B) 56
(C) 49
(D) 8
2. B.

In fact, the set $\{1,2,3\}$ has 8 subsets, and the set $\{4,5,6\}$ has 7 proper subsets.
Therefore, there are 56 sets that satisfy the condition.