Can someone explain me this? It's about arrays and some handling of an if statement inside of array : <p>I don't understand the part of the if statement in this piece of code.
And is it possible to write this with using if and else if?</p>

<pre><code>int klein(int A[], int n, int&amp; i, int X) 
{

    int j;
    int kl = -1; 
    i = -1; 

    for(j = 0; j &lt; n; j++)
    {


    if(A[j] &gt; X &amp;&amp; (kl == -1 || A[j] &lt; X)) 
      {
            i = j;                      
            kl = A[j] ;                 
        }
    }
    return kl;

}
</code></pre>
