array size too long

how to declare an array of 1000000000 size

For example int a[1000000000] ?

You cannot do that, if int is 4 bytes, this is almost 4GB of memory, are you able to write 4GB of memory is few seconds (even if you have such big memory, which is not the case at CodeChef)…

Globally. However, you’re not going to be asked for such a big array but if it happens declare it before main().

Unfortunately you cannot! and also it was not necessary to declare that huge array in any problem as far I know, try to think of some other ways.By the way maximum size you can store is 10^7(10 power 7).