NZEC Error in C++

The code while compiling gives the correct output but while submitting it gives a Runtime error(SIGSEGV). Please Help.!..

using namespace std;
int main() {
// your code goes here
int n,arr[20],oa[20];
for(int i=0;i<n;i++){
for(int i=0;i<n;i++){
for(int i=0;i<n;i++){
cout<<oa[i]<<" ";
return 0;

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Also - which Problem are you trying to solve? :slight_smile:


This must be the problem you’re trying to solve

And, there was another thread the other day, it should answer your question.

1 Like

Thank you it actually worked…