Set the length of array c to be 6 and, in cases where the length of the result is 5, make the first element zero.
Right 98% of the time, and don't care about the other 3%.
If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.