a guest Sep 17th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void findmax(int *arr, int n, int m){
  2.     int i,j,max;
  3.     for(i=0, max=*(arr+i*m) ; i < n ; i++){
  4.         for(j=0; j < m; j++)
  5.             if(*(arr+i*m+j)>max)
  6.                 max = *(arr+i*m+j);
  7.         printf("Max for row %d: %d\n",i,max);
  8.     }
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand