Given:
- Tap A fills in 12 hours → Rate = \( \frac{1}{12} \)
- Tap B fills in 12 hours → Rate = \( \frac{1}{12} \)
- Tap C empties in 8 hours → Rate = \( -\frac{1}{8} \)
Total rate when all taps are open:
\[
\frac{1}{12} + \frac{1}{12} - \frac{1}{8}
\]
Convert to a common denominator (LCM = 24):
\[
\frac{2}{12} = \frac{4}{24}, \quad \frac{1}{8} = \frac{3}{24}
\]
\[
\text{Net rate} = \frac{4}{24} - \frac{3}{24} = \frac{1}{24}
\]
Time required to fill the tank:
\[
\frac{1}{\frac{1}{24}} = 24 \text{ hours}
\]
Thus, the correct answer is 24 hours.