Error in passing of 2d array

#include
using namespace std;
void printa(int a[][10],int r,int q)
{int j=0;
for(int i=0;i<q;i++)
{if(j!=r)
{
for(j=0;j<r;j++)
cout<<a[j][i]<<" “;
}
else
{for(j=r-1;j>=0;j–)
cout<<a[j][i]<<” ";
}
}
}
int main()
{int r;
int q;
cin>>r>>q;
int a[r][q]={0};
for(int i=0;i<r;i++)
{ for(int j=0;j<q;j++)
cin>>a[i][j];
}
printa(a,r,q);

}
RESPECTED SIR
I HAVE WRITTEN THE ABOVE CODE FOR WAVE PRINT OF 2D MATRIX AND IT IS SHOWING THE BELOW MENTIONED ERROR. IF I AM PASSING 33 MATRIX THEN THE CODE IS RUNNING PROPERLY. KINDLY HELP TO RESOLVE IT.
26 13 [Error] cannot convert 'int (
)[q]’ to ‘char ()[10]’ for argument ‘1’ to 'void printa(char ()[10], int, int)’

hey Mehak, You are getting this error because you are passing an array of size 3X3 (int a[r][q] as r=q=3) but in printa function you declaring an array in which number of columns are 10 (see here void printa(int a[][10],int r,int q) ).
So you either change the size in main function or in printa function so that there should be mismatch of size in both array as both the array should be copy of each other.