Working with 2D arrays is quite important. Here we will do swapping of columns in a 2D array. You are given a matrix M of r rows and c columns. You need to swap the first column with the last column.
The first line of input contains T, the number of testcases. T testcases follow. Each testcase contains two lines of input. The first line contains r and c, separated by a space. The next r lines contains c elements of the matrix, separated by spaces.
For each testcase, in a new line, print the modified matrix.
Since this is a function problem, you don't need to take any input. Just complete the provided function interchange(int , int ) that take rows and columns number as parameter.