In the code snippet below, the array
arr
is declared in line #7 with a size of 4
with 4 initial values also defined.
![4 const int SIZE=4; 6 int main() int arr[SIZE] {3,14, 7,81); = 8 9, 10 for(int 1-0;1 < SIZE+2;i++) { cout << arr[i] << ; 12 13 14 15 16 cout <<endl << endl; return e;](http://d2vlcm61l7u1fs.cloudfront.net/media%2Fb26%2Fb266d58e-7c73-410c-aefa-a28c75473640%2FphptMJ8ud.png)
However, in line #9 to #11, the arrays are accessed to beprinted. The loop is
set at SIZE+2 in line #9 which means that we will access valuesbeyond that of
the array. C++ does not check for out-of-bound access in anarray.
Output printed from
PayPal Gateway not configured
PayPal Gateway not configured