The code while compiling gives the correct output but while submitting it gives a Runtime error(SIGSEGV). Please Help.!..
#include
using namespace std;
int main() {
// your code goes here
int n,arr[20],oa[20];
cin>>n;
for(int i=0;i<n;i++){
cin>>arr[i];
}
for(int i=0;i<n;i++){
oa[i]=arr[n-i-1];
}
for(int i=0;i<n;i++){
cout<<oa[i]<<" ";
}
return 0;
}