Please read the instructions carefully. The following functions are related to the conversion of indexes between 1D and 2D arrays. Function a) maps a 2D index pair to a 1D index. Functions b) and c) calculate each 2D index member from a 1D index. Based on function a), complete functions b) and c).
a) int index2D_to_1D(int x, int y, int MaxY){
return y * MaxY + x;
}
b) int index1D_to_2D_X(int index, int MaxY){ }
c) int index1D_to_2D_Y(int index, int MaxY){ }