Can I swap the positions of the toilet and bath tub?
It's not going to be easy, but it's possible. The toilet drain pipe is going to be 3", and won't have a trap (since the trap is built into the toilet). The toilet will also only have a cold water supply. The tub drain pipe will likely be 1 1/2", and will have a trap. The tub will obviously have both cold and hot water supplies.

To switch the location of the fixtures, you'll have to reroute the plumbing for each to the new locations. Depending on the current location of the fixtures, existing plumbing, and the amount of access to the plumbing. This job could range anywhere from not so bad, to a complete gut and rebuild.