Ryan Pai wrote:For each string you're only allocating c characters. You need one more for the null terminator.
You also don't free the memory you malloc, so there's a leak.
I'd suggest using a static two dimensional array insead.
Thank you, you are a nice guy
but could you explain this problem for me...
i can't realize it completely...
and my code got wrong answer again...
