same as anything else.
make a temporary 1d array of length row.
copy all the stuff from 1 row into it (for loop, or memcpy for simple types)
copy all the stuff from 2 to 1 (another loop/memcpy)
copy all the stuff from tmp to 2
if you had declared the thing differently it would be possible to swap only pointers (each pointer being a row in and of itself) but doing that has its own complexities. You have to pick your poison.
you can construct an array of pointers and sort that, from the original, and have the best of both worlds with a bit of trouble.
int *t[100];
for(..)
t[i] = a[i];
and then use pointer swaps in t to sort a 'view' of a... does that make sense? A isnt sorted, but t refers back to a in a way that 'looks' sorted. t[a][b] still works same as A. Messing with data in A changes T, and T changes A ... this approach expects you to understand pointers pretty well...