title: How to find the maximum element in the matrix using function?
body: <pre><code> #include&lt;stdio.h&gt;
   int findMax(int **a,int r,int c);
   int main()
   {
    int a[10][10],i,j,max,r,c;
    printf("Enter the number of rows in the matrix\n");
    scanf("%d",&amp;r);
    printf("Enter the number of columns in the matrix\n");
    scanf("%d",&amp;c);
    printf("Enter the elements in the matrix\n");
    for(i=1;i&lt;=r;i++)
    {  for(j=1;j&lt;=c;j++)
       scanf("%d",&amp;[i][j]);
    }
    printf("The matrix is\n");
    for(i=1;i&lt;=r;i++)
    { for(j=1;j&lt;=c;j++)
      scanf("%d",&amp;a[i][j]);
    }printf("\n");}
    max=findMax((int **)a,r,c);
    printf("The maximum elements in the matrix is %d\n",max);
    return 0;
    }
    int findMax(int **a,int r,int c)
    { 
      int t,i,j;
      t=a[1][1];
      for(i=1;i&lt;r;i++)
      { for(j=1;j&lt;c;j++)
      { if(a[i][j]&gt;t)
          t=a[i][j];
      }
      }
     return (t);
    }
  </code></pre>
  
  <p>Here I attached my coding, I need to find the maximum element present in the matrix using function, I am doing the coding, calling function is not executed, I don't know why, Help me to figure it out.</p>