The correct option is A Painting the machine
Most machines are made of metals like iron which rust on interacting with the oxygen in the air or water. So to avoid rusting, the machine needs to be painted well with waterproof paint.
Washing, or putting the machine in the sunlight, would accelerate the rusting of its parts, and hence, are not preferrable. Cleaning the machine with a sand paper actually removes any paint, and exposes the machine to the air more, which would further corrode the metal.