There are four types of bacteria which are classified on the basis of the nutritional requirements. These are the groups which obtain carbon from different sources. There are photoautotrophs which can perform the process of carbon dioxide fixation and the source of energy is sunlight. The photoheterotrophs are the organisms which use the organic compounds for the carbon source and light is used as the source of energy. The chemoautotrophs are the organisms which can use carbon dioxide as the source of carbon and inorganic compounds like ammonia and H2S. The chemoheterotrophs can use the energy and carbon from the organic compounds.