Spiral Scanning for matrix using recursion
It is very important you indent your code properly as it will make your code easier to read and less prone to errors.  This statement in particular is problematic:


if(counter&gt;=n*m)
return;



You should use returns around your if blocks and loops even when they are single-statement bodies, you should indent your code so it is clear the return is part of the if block, and you should use spaces around your operators to make it easier to read:

if(counter &gt;= n * m) {
    return;
}


Right here, you should remove the if, braces, and indentation:

    //scan bottom
 //   if(m-call&gt;0)
    {   printf("\nbottom\n");
        for(j=m-2-call;j&gt;=call;j--)
        {printf(" %d ",a[n-1-call][j]);
        counter++;
        }
    }


It doesn't make sense to have messy, hard-to-read code like this lying around.  Also, the final code shouldn't show fixed bugs and commented (dead) code - it should just be the working code and comments stating what it does as needed (I am not an advocate of a comment per line).

You should name your variables better:

void spiralscan(int a[][20],int n,int m,int call,int counter)


What are n and m anyway?  Also, you should put spaces after your commas.

It will probably be easier to read your code if you use PascalCase, snake_case, or camelCase to name your variables and functions becausevariableandfunctionnameswithnowordseparatorsarehardtoreadwhenverylong.  It seems snake_case is common among C programmers.