How print first and last row in an array using C : I have m x m array and i am trying to find out first and last row of a given matrix (using C) which is

e.g mat[3][3]={1,2,3,
               4,5,6,
               7,8,9};

But i could not figure out how to get first and last row using c. If some have the algorithm then please share with me.
  