title: Warning: assignment makes integer from pointer without a cast
body: <p>I am trying to sort the elements in a 2d array ,but in assigning the value to k it is giving this error.</p>
  
  <blockquote>
    <p>"warning: assignment makes integer from pointer without a cast".</p>
  </blockquote>
  
  <p>Why am I getting it and how can I resolve it?</p>
  
  <pre><code>for(i=1;i&lt;3;++i)
      {
          for(j=3-1;j&gt;=1;--j)
             {
                  if(a[j-1]&gt;a[j])
                     {
                           k = a[j-1];
                            a[j-1]=a[j];
                           a[j] = k;
                     }
             }
       }
  </code></pre>