Step 1: Understanding the Concept
In a ccp unit cell there are 4 anions and 8 tetrahedral voids (twice the number of anions).
Step 2: Count the ions
Number of \( \text{B}^- = 4 \). Half of the tetrahedral voids \( = 4 \), so number of \( \text{A}^+ = 4 \).
Step 3: Formula
\( \text{A}:\text{B} = 4:4 = 1:1 \), so the formula is \( \text{AB} \).
Final Answer:
The formula of the solid is AB.
\[ \boxed{\text{(D) }\mathrm{AB}} \]