BATMOBILE UPGRADATION

#include
using namespace std;
long long int a[1003];
int main()
{
int t=0,n=0,i=0;
cin>>t;
while(t–)
{
cin>>n;
for(i=0;i<n;i++)
cin>>a[i];
cout<<n<<"\n";
}
}

//SHOWING Runtime Error SIGSEGV

Is N <= 1000? If no, then please declare array as int a[n+2]

1 Like
//