The Brainliest Answer!
the ratio of atoms in a carbon and magnesium will be the same as the ratio of their moles,so first of all we have to find :
1.moles of carbon in 1g of carbon
2.moles of magnesium in 1g of magnesium

a)1 mole of C=gram atomic mass of C=12
12 g of C=imole
∵1g=1/12 mole
thus,we have 1/12 mole of C elemenr and it contain x ,since an eqaul number of moles of all element contain of atom,so 1/12 moles of Mg will also contain x atoms of Mg
b) 1 mole of Mg =gram atomic mass of =24g
now, 24g of Mg=1 moles
so, 1 g of Mg =1/24 mole
we know that :1/12 mole of Mg contains=x atoms
so,                  1/24 mole of Mg contains=x*12/24
                                                                   =x/2 atoms.

2 4 2
Lets do step by step
1 mole of carbon = gram molecular mass of carbon = 12 grams. 1g carbon = 1/12 mole
1g of carbon contains x atoms and 1g = 1/12 mole.
Therefore 1/12 mole of carbon has x atoms so 1/12 mole of magnesium also contains x atoms.
1 mole of magnesium = 24g
Therefore, 24 gram = 1 mole
1g = 1/24mole.
1/12 mole of magnesium = x atoms
1/24 mole of magnesium = x x 12/24 ( x multiplied by 12, divide by 24) = x/2 atoms
1 gram of magnesium has x/2 atoms
2 4 2
Yeh when expert has given answer he can only be brainliest ....that's life