How to find which row has the biggest sum in 2D array?
<p>I have 2D array, I need to write a function to find which row has the biggest sum, and if there is more than one row with the same sum, I need to print no particular max. This is what I wrote so far:</p>

<pre><code>int find_max_sum(int b[N][N])
{
    int row_sum = 0;
    int row_max = -1;
    int i,j,k;
    int counter=0;
    for(int i =0;i&lt;N;i++)
    {
        row_sum = 0;
        for (j = 0; j &lt; N; ++j)
        {
            row_sum +=  b[i][j] ;
        }
        if(row_max &lt; row_sum)
        {
            row_max = row_sum;
        }
    }
    for (i = 0; i &lt; N; i++)
    {
       for (j= 0;j&lt; N;j++)
       {
           if(k=row_max);
           counter++;
       }
    }
    if (counter&gt;1)
        return(printf("No unique max.\n"));
    else
        return row_max;
}
</code></pre>

<p>Now I need help with the counter thing, and if the function is <code>int</code> how can it return prints? Is it possible?</p>