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