Can carbon form bonds with the atoms of other elements?

It is observed that carbon atoms form compounds not only with hydrogen atoms but also with atoms of other elements like oxygen, sulphur, nitrogen, phosphorus, halogens etc.
These atoms are called heteroatoms and the compounds are formed with particular functional groups.