Problem with malloc()

Hey RuggedCircuits, thanks a lot!!! I hadn't considered that. I know that using malloc is quite complicated for beginners but, for what I need, I dont see any alternative rather than dynamically expand an array. Just one more thing: how can I be sure that I'm not trying to write on an unavailable memory space?