FYI, this forum support code formatting. Use code tags next time.
The problem: You are concatenating to myArray a string larger than 10 characters. You are corrupting the stack, most likely. Always use strncat() instead; same goes for strcpy() (use strncpy() instead), etc.
If you look up those functions (with the extra n), you'll notice that they require the destination size from you, the programmer. Assuming that you, the programmer, won't lie about the destination size, the n-versions will perform a check to see if what you want to do (concatenate, copy, etc.) can be done in the specified destination without exceeding the destination's capacity.