typedef struct _grid { int nrows, ncols; //the size of the grid float ** data; // the 2D array of values in the grid } Grid; /* asume grid is a valid grid with its 2D array allocated. set the value of grid.data[i][j] to val*/ void set(Grid * g, int i, int j, float val); /* assume grid is a valid grid with data allocated. return the value in the grid at position i,j */ float get(Grid g, int i, int j);