Turbo sort https://www.codechef.com/problems/TSORT

My test case is passed but it gives a runtime error when I submit.Please tell me where I am wrong.
#include <stdio.h>

int main(void) {
// your code goes here
unsigned long int t;
scanf("%lu",&t);
const unsigned long int c=t;
unsigned long int a[c],i,k,co=0;
for(i=0;i<c;scanf("%lu",&a[i]),i++);
while(t–)
{
co=0;
for(i=0;i<c-2;i++)
{
if(a[i]>a[i+1])
{
k=a[i];
a[i]=a[i+1];
a[i+1]=k;
co++;
}
}
if(co==0)
goto L;
}L:for(i=0;i<c;i++)
{
printf("%u\n",a[i]);
}
return 0;
}