The calculation for such a question can be achieved via Avogadro hypothesis
We know molar mass of CO2 is 44g/mole which is the sum of atomic masses i.e; C and 2 oxygen atoms
Molar mass of CO2 =12(C)+2*16(O) = 44 g/mole will contain 6.023 ※10^23 CO2 molecules ..
44g/mole = 6.023 ※10^23 CO2 molecules
=> 1g = (6.023/44) ※10^23 CO2 molecules
==> 8.80g = 8.80(6.023÷44)10^23 = 1.2046 ※10^23 molecules of CO2….
Thus there r 1.2046 ※10^23 molecules of CO2 in 8.80g
if u need to calculate no. of carbon atoms then multiply result by 1 and if u need no of oxygen atoms in 8.80g of co2 then multiply the result by 2 ….