tHIS PROGRAM IS GIVING DESIRED OUTPUT. but runtime error is shown after submission.

can anyone helo please.

///////////////////////////////////////////////////

#include<stdio.h>

int main()

{

int k,t,i,n,swap;

int arr[10^6];

scanf("%d",&n);

if (n<=10^6)

for (t=0;t<n;t++)

{

scanf("%d",&arr[t]); // array is prepared

}

//////////////////////////////////////////////////////////////////

```
for (t=0;t<n-1;t++)
{
for (k=0;k<n-1;k++)
{
if (arr[k]>arr[k+1])
{
swap = arr[k];
arr[k] = arr[k+1];
arr[k+1] = swap;
}
}
}
for (t=0;t<n;t++)
printf("\n%d\n",arr[t]);
```

return 0;

}