Adding char to string

surepic:
(int)sizeof(array)/(sizeof(array[0]))

The cast causes a failure if the array size overflows a positive signed integer (32767 bytes for an AVR Arduino).

When working with sizeof don't cast. If you do need to cast do it to an unsigned type.