I am going to give you here a pseudo-code for a solution... you will need to translate it into a C code...
Main:
dim a[4,4] for i=0 to 3
for j=0 to 3
a[i,j]=random(10) next
next
data ma;a[0,0],a[0,1],a[0,2],a[0,3]
for i=0 to 3 mi=a[i,0] for j=0 to 3 print a[i,j]; if ma[j] < a[i,j] then ma[j] = a[i,j] if mi > a[i,j] then mi = a[i,j] if j==3 then print mi next j
next i
for i=0 to 3 print ma[i];
next
end