electrostatic and gravitational force
Mechanical energy remains constant (conserved) if only conservative forces act on the particles.
In this sense, the following forces are conservative:
While the Friction Force and the Magnetic Force are not.
According to this, mechanical energy is conserved in the presence of electrostatic and gravitational forces. Therefore the correct options are A and D.