please help me to find runtime error in this binary substrings problem

#include<stdio.h>
#include<string.h>
int main()
{ char a[11],b[6];
int i,j,k,t,p,n,l=0,m=0;
for(t=0;t<24;t++)
{m=0;

       gets(a);
   gets(b);
   p=strlen(b);
   char c[p+1];
   c[p]='\0';
   n=strlen(a)-strlen(b);
   for(i=0;i<=n;i++)
   {l=0;
   for(j=i;j<p+i;j++)
      {c[l]=a[j];
      l++;}
      k=strcmp(c,b);
      if(k==0)
      {printf("\n1\n");
      break;}

     else if(k!=0)
     {m++;}
  if(m==(n+1))
  {printf("\n0\n");}


   }

}}

Hi!
you cant declare size of char as variable without using any special fuctions : “char c[p+1]”…as size of char should be a constant…it will surely give runtime error.

you can use dynamic memory allocation . malloc or calloc…