Polarity of magnetic filed of a solenoid carrying current
If the current in the coil facing you is flowing in clockwise direction then its the south pole. If the current is flowing in anti-clockwise direction, then its the north pole.This can be figured out using Right hand thumb rule.