Serial communications

If you do not provide a size for an array, the size of the array is computed from the number of initializers present. Since a NULL terminated array of characters does not need to be explicitly initialized, just use the explicit declaration form:

char cbuffer[10];
char command[4];
char cnumber[7];

In setup(), add:

cbuffer[0] = '\0';
command[0] = '\0';
cnumber[0] = '\0';

In loop, don't forget to add a NULL after every character added to cbuffer, command, and cnumber.