Is there a limit to how many times a loop can run in C?

```

void main()
{
    int T,N,x,X,i;
    x=0;
    scanf("%d",&T);
    while(T>0)
    {
        T--;
        scanf("%d",&N);
        X=0;
        while(N>0)
        {
            N--;
            scanf("%d",&x);
            if(x>X){X=x;}
        }
        printf("Case: %d",x);
    }
}

```

T has a range of 0-250, and N has a range of 0-1000. x has a range of 0-10,000.
Whenever the N exceeds something above 800, my console stops taking input.
Can this be due to a limit on the input buffer?