A statement such as
char* commande = (char*) malloc(len3 + len4 + 1);
is a variable declaration. It says the compiler: I want commande to be a pointer to a character. You can declare variables only once in a function, as it wouldn't make any sense to redeclare a variable.
The errors about incompatible implicit definitions come from the fact that you didn't tell the compiler what type malloc
has. To do that, you have to include a header file that contains all neccessary declarations. Place the following line on top of your file:
#include <stdlib.h>