If you have changed vals[200] to vals[199] (vals[200] is an error) and keep the sentence *ptr++=0 in your original program, it seems to will not terminate ifself. I have not practised it. If you will try it, please let me know the result. If it terminte itself, I misunderstand something and I will learn some from my misunderstanding. Thank you!