All test cases not running

#include
using namespace std;
int main() {
int r,c;
cin>>r>>c;
int arr[r][c];
int startrow = 0;
for(int i=0;i<r;i++)
{
for(int j=0;j<c;j++)
{
cin>>arr[i][j];
}
}
if(1<=r<=10 and 10>=c>=1){
while(startrow<r)
{
for(int i=0;i<r;i++)
{
cout<<arr[i][startrow]<<","<<" β€œ;
}
startrow++;
for(int j=r-1;j>=0;j–)
{
cout<<arr[j][startrow]<<”,"<<" ";
}
startrow++;
}
}
cout<<β€œEND”;
return 0;
}

@supratik260699
hello Supratik,
a)
image

it should be startrow<c

b) also before running second for loop makesure startrow<c