Runtime Error(SIGSEGV)

As it’s everywhere written the cause that using too much memory. I just want to know how much memory cause runtime errors??

#include <stdio.h>

int main(void) {
    int t;
    scanf("%d",&t);
    while(t>=1)
    {
        int n,count=0;
        scanf("%d",&n);
        int a[n];
        for(int i=0; i<n ; i++){
            scanf("%d", a[i]);
        }
        for(int i=0; i<n ; i++)
        {
            if(a[i]>=1000)
            {
                count++;
            }
        }
        printf("%d",count);
        t--;
    }
}

i am getting the Runtime Error(SIGSEGV), help please!!