Amount of substance can be measured in the number of moles.
Avagadros constant states that 1 mol of any substance is made of 6.022 x 10^23 units.
These units could be atoms making up elements or molecules making up compounds
1 mol of C is made of 6.022 x 10^23 atoms of C
Since 1 mol of C has a mass of 12.011 g
Therefore 6.022 x 10^23 atoms of C weigh 12.011 g
Then 1 atom of C weighs -12.011 g / 6.022 x 10^23 atoms = 1.99 x 10^(-23) g
Mass of 1 C atom is 1.99 x 10^(-23) g