need help in codes!

My question on C....say...i have a 2d array of [3][4].......how can i use the values in this array and dump into a function whereby it will calculate the average value in [0][1] and [0][2] and put back into a new 2d array?