The correct answer is (B).
Living organisms in an ecosystem can be divided into three categories: producers, consumers and decomposers based on their mode of obtaining nutrition (food).
Producers are green plants. They produce their own food through photosynthesis.
Consumers are animals and they obtain their energy from producers or from other organisms that consume producers.
Decomposers are microorganisms like bacteria and fungi that obtain food from dead and decaying organisms.