The program has a subtle error due to a "memory leak."
The array has only 100 entries, yet the program initializes
the array entries in a loop that accesses the element in "position" 101.
The initialization of this array entry may
overwrite the value of the variable "key" with the value
stored in the spurious entry in position 101.
This problem is also called "buffer overflow".