Right answer is (d) both metals and nonmetals
The explanation is: In redox reactions, water reacts with metals and nonmetals both. For example, take the reaction of sodium with water, the products are sodium hydroxide and hydrogen, whereas fluorine reacts with water in order to form hydrogen cation and fluorine anion with oxygen.