I was solving a problem, and I declared the size of an array as n, before inputting n's value and it worked for the first test case but not for the second test case. Why?
P.S: I couldn't find any relevant information online.
Here is the code snippet
int n,arr[n];
cin>>n;