Let the molecular formula of the hydrocarbon be \( \text{C}_2 \text{H}_n \). The ratio of mass percentage of C to H is given as 12 : 1, which means:
\[
\frac{12}{1} = \frac{2 \times 12}{n \times 1} \quad \text{(since there are 2 carbon atoms)}.
\]
Thus, \( n = 1 \). The molecular formula of the hydrocarbon is \( \text{C}_2 \text{H}_2 \).
The molar mass of \( \text{C}_2 \text{H}_2 \) is:
\[
\text{Molar mass of C}_2 \text{H}_2 = 2 \times 12 + 2 \times 1 = 26 \, \text{g/mol}.
\]
Now, we calculate the moles of the hydrocarbon:
\[
\text{Moles of hydrocarbon} = \frac{\text{Mass of hydrocarbon}}{\text{Molar mass}} = \frac{3.38}{26} \approx 0.13 \, \text{mol}.
\]
Since 1 mole of the hydrocarbon produces 2 moles of CO2, the moles of CO2 produced are:
\[
\text{Moles of CO2} = 0.13 \times 2 = 0.26 \, \text{mol}.
\]
Finally, the mass of CO2 produced is:
\[
\text{Mass of CO2} = \text{Moles of CO2} \times \text{Molar mass of CO2} = 0.26 \times (12 + 2 \times 16) = 0.26 \times 44 = 11.44 \, \text{g}.
\]
Final Answer: 11.44 g