Call a function transopose(*x, *y) and pass the address of the items to swap. You can use the xor method described in my previous post to do the swap. First call would swap item 2 in col 1 with item 2 in row 1. and so on.