Hey everyone, Can someone please tell why my code is not working ,To be more precise why If(x==1) is not getting executed??? And why i am getting runtime error??This is A DT chip easy problem.
#include <stdio.h>
int main(void) {
int a,b,c,x,e,f,g,h,i,j;
scanf(“%d”,&a);
scanf(“%d”,&b);
scanf(“%d”,&c);
int arr[a][b];
for(i=1;i<=a;i++)
{
for(j=1;j<=b;j++)
arr[i][j]=1;
}
while(c–)
{
scanf(“%d”,&x);
scanf(“%d”,&e);
scanf(“%d”,&f);
scanf(“%d”,&g);
scanf(“%d”,&h);
if(x==1)
{ printf(“yooo”);
for( i=e;i<=g;i++)
{
for(j=f;j<=h;j++)
arr[i][j]=0;
}
}
else
{
if(arr[e][f]==arr[g][h])
printf("YES\n");
else
printf("No\n");
}
}
return 0;
}