You can hang the iron rods on a string and watch which one turns to the north (or hang just one rod).
Gardner gives one more solution: take one rod and touch with its end the middle of the second rod. If they get closer, then you have a magnet in your hand.
The real magnet will have a magnetic field at its poles, but not at its center. So as previously mentioned, if you take the iron bar and touch its tip to the magnet's center, the iron bar will not be attracted. This is assuming that the magnet's poles are at its ends. If the poles run through the length of the magnet, then it would be much harder to use this method.
In that case, rotate one rod around its axis while holding an end of the other to its middle. If the rotating rod is the magnet, the force will fluctuate as the rod rotates. If the rotating rod is not magnetic, the force is constant (provided you can keep their positions steady).