In this question, we have the following balanced equation:
C6H12O6 -> 2 C2H5OH + 2 CO2
From this balanced equation, we can determine that the molar ratio between C6H12O6 and CO2 is 1:2, 1 mol of glusoce for 2 moles of carbon dioxide, for 0.4 moles, we will have:
1 C6H12O6 = 2 CO2
0.4 C6H12O6 = x CO2
x = 2*0.4
x = 0.8 moles of CO2 will be produced from 0.4 moles of C6H12O6