Help me find the runtime error in this code. Please. Thanks.

#include <stdio.h>
#include <stdlib.h>
inline int input( )
{
int n=0;
int ch=getchar_unlocked();
while( ch >= ‘0’ && ch <= ‘9’ )
n = (n<<3)+(n<<1) + ch-‘0’, ch=getchar_unlocked();
return n;
}

int main(void)
{
int t,i,r,c,flag,j;

t=input();
while(t--)
{
	r=input();
	c=input();
	
	char a[r][c];
	
	for(i=0;i<r;i++)
	{
		scanf("%s",a[i]);
	}
	flag=0;
	for(i=0;i<r;i++)
	{
		for(j=0;j<c-4;j++)
		{
			if((a[i][j]=='s' || a[i][j]=='S') && (a[i][j+1]=='p' || a[i][j+1]=='P') && (a[i][j+2]=='o' || a[i][j+2]=='O') && (a[i][j+3]=='o' || a[i][j+3]=='O') && (a[i][j+4]=='n' || a[i][j+4]=='N') )
	        {printf("There is a spoon!\n"); flag=1;break;}
		}
		if(flag==1)
		break;
	}
	
	if(flag==0)
	{
	for(j=0;j<c;j++)
	{
		for(i=0;i<r-4;i++)
		{
			if((a[i][j]=='s' || a[i][j]=='S') && (a[i+1][j]=='p' || a[i+1][j]=='P')&& (a[i+2][j]=='o' || a[i+2][j]=='O') && (a[i+3][j]=='o' || a[i+3][j]=='O') && (a[i+4][j]=='n' || a[i+4][j]=='N')) 
	        {printf("There is a spoon!\n"); flag=1; break;}
		}
		if(flag==1)
		break;
	}
	} //endofif

    if(flag==0)
    printf("There is indeed no spoon!\n");
    
}//end of test case

return 0;

}

You’re scanning a 1-D array in the first go that is not even declared or used anywhere else in the program.