int n;cin>>n;
int arr[n]{};
I have a small problem ,why is this decleration of array wrong?I have used it on Codechef several times until recently i got a WA!
After this I declared array as,
int n;cin>>n;
int arr[1001]{0} ; //max size of input possible
I got an AC!