I am unable to execute the below code in codeblock ide but if I declare the array globally then I can execute it.
What are the limits on array size when declared globally and when declared locally ? What is the thumb rule for declaring array size in competitive programming contest like spoj, codechef etc?
Also if the error is due to codeblock ide. Then how can I correct it ?
#include<iostream>
using namespace std;
int main()
{
int arr[999999];
return 0;
}