my code shows runtimme error! why it is so???(0<n<10ˆ5;t<10)!
though my tc is o(10ˆ6) then why it is so??
#include <stdio.h>
int main(void) {
int t;
scanf("%d",&t);
while(t–){
int n,a[n],ans=0;
scanf("%d",&n);
for(int i=0;i<n;++i) {
scanf("%d",&a[i]);
ans|=a[i];}
printf("%d",ans);
}
return 0;
}