You wrongly delimited the memory segment I see. Look, you gave to Mo99 an array of size 100 but the loop goes from 0 to 100, it's 101 spaces of memory, because you wrote i=0 to i<=100. This includes i=100.