A coil surrounding a magnetic core having high permeability and low retentivity, through which an electric current is fed to magnetise the core is what makes up an electromagnet. Wherever controllable magnets are needed, as in devices where the magnetic flux needs to be adjusted, reversed, or turned on and off, an electromagnet is used.
Hence, both A and R are correct and R is the correct explanation of A.