Solution :
As the charge is stationary, hence
Hence, no torque at all.
When the charge is moving in positive x direction and the field will be in the negative y direction outside the bar, then :
Hence, the force have direction
.
When instead of charge, an iron nail is used, then there will be induced magnetic field in the soft iron. The nature of the pole induced will be opposite near tot he bar. That is the north pole will be induced near the south pole and vice versa. That is why whichever be the pole of magnet closest to iron will be attracted by iron.