The input argument is a char *
someReturnType motor_cmd(char *input)
{
}
Now, the return type could be a challenge. If the motor_cmd function is dynamically allocating space to hold the output, the return type could be char *, too. However, the caller is then responsible for freeing the pointer when done with it.
It is usually better to pass the address of the array to write to to the function:
void motor_cmd(char *input, char *output)
{
}
Then call it:
char buffer[48]; // Or whatever size is needed
motor_cmd("X1000", buffer);