How do I get this function to work for arrays with an odd height?
Code:int invert_array(int ptrarray[width][height],int width, int height) { for (int down=0, up=height-1; down<=up; ++down,--up){ for (int forward=0, reverse=width-1; forward < width; ++forward,--reverse){ swap(&ptrarray[forward][down],&ptrarray[reverse][up]); } } }