this is the code which I tried
int main(){
int n;
cout<<"Type the number of elements\n";
cin>>n;
cout<<"Type the integars";
int arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
}
cout<<"This is the reversed array ";
for(int i=n;i>=0;i--){
cout<<arr[i]<<" ";
}
return 0;
}
this is the output pls explain why is 0 coming where did I go wrong?