The material to be used for making an electromagnet should have high permerability and low retentivity. Moreover, less energy should be utilised for magnetisation of the material.
Thus, material B should be used for making the core of an electromagnet.