Carbon forms a large number of compounds because of the following reasons:
(a) Tetravalency: Carbon atoms readily form covalent bonds with the other atoms.
(b) Catenation: Two carbon atoms readily form covalent bonds and this bond is more stable than the bonds formed by the other elements.
(c) Carbon atoms have varying bond order and hybridisation that is it can form double or triple bonds.
(d) The electronegativity of the carbon atom is average.