Explain how painting of an iron gate prevents it from rusting.

Rusting of iron articles is due to the exposure of iron to the atmosphere for some time. Painting of iron gate prevents iron from rusting because the layer of paint prevents the iron gate to come in direct contact of atmosphere, water and both. Thus, rusting of iron can be prevented.