// Write a function that takes the 2-D matrix and populates an array // that contains the 2nd smallest element of each row. Print this array. // Author:rahule@iitk.ac.in #include int op[4]; //aglobal array to store output void second_min(int a[4][4]); //function to calculate second min array main() { int a[4][4],i,j; printf("\nEnter the 4x4 matrix:"); //entering the array for(i=0;i<4;i++) for(j=0;j<4;j++) { printf("\n(%d,%d) :",i,j); scanf("%d",&a[i][j]); } second_min(a); //calling function to calculate the output.The output is stored in the global array printf("\nThe second minimum array is :"); //required output stored in global array is being printed for(i=0;i<4;i++) printf("%d ",op[i]); } void second_min(int a[4][4]) { int i,j,sec_min,first_min; for(i=0;i<4;i++) { sec_min=a[i][0]; //initialilze first_min and second min as initial element of the row first_min=a[i][0]; for(j=0;j<4;j++) { if(a[i][j]