Assigned data to out of array allocation but program show output with a buffer overrun has occurred : <p>I wrote a sample program like below:<br>
  when program execution finish this error occur "A buffer overrun has
  occurred".<br>
  I assigned data to out of array allocation but output show i mentioned in
  code.<br>
  Program compile and run on VS2010  </p>

<pre><code>void check(int arr[])  
{  
arr[0]=100;  
arr[8]=103;  
arr[10]=102;  
cout&lt;&lt;arr[10]&lt;&lt;endl; // output show 102  
}  
int main()  
{  
int arr[] = {2, 3, 4, 10, 40, 56, 69, 89, 99};  
check(arr);  
arr[10]=102;  
cout&lt;&lt;arr[10]&lt;&lt;endl; // output show 102  
return 0;  
}
</code></pre>
