An electromagnet is a solenoid coil that attains magnetism due to a flow of current. It works on the principle of magnetic effect of current.
(i) By suspending magnetised bar and identify its north and south poles.
(ii) By finding the polarity of electromagnet using the property -like poles repel.