I had declared a array as
int* arr = new int[10];
Then I filled up the first 10 element and also did
arr[10] = 100;
arr[11] = 200;
When I do
cout << arr[10] << '\t' << arr[11];
and the output was
100 200
I wonder why the code is working. Is this valid or am I missing some information on this topic. Shouldn't the arr[10] and arr[11] be holding any garbage value.