#include<stdio.h> #define N 4 int fun(int a[][N]) { int i,j,max=a[0][0]; for(i=0;i<2;i++) for(j=0;j<N;j++) if(max<a[i][j]) max=a[i][j]; return max; } main() { int aa[2][N]={1,2,3,4,8,43,56,12}; printf("max=%d ",fun(aa)); }
#include<stdio.h> #define N 4 int fun(int a[][N]) { int i,j,max=a[0][0]; for(i=0;i<2;i++) for(j=0;j<N;j++) if(max<a[i][j]) max=a[i][j]; return max; } main() { int aa[2][N]={1,2,3,4,8,43,56,12}; printf("max=%d ",fun(aa)); }