#include<stdio.h>
#include<stdlib.h>
int main(){
int i, n = 0;
char *color[20], str[15];
scanf("%s", str);
while(str[0] != '#'){
color[n] = (char *) malloc( sizeof(char) * ( strlen(str) + 1 ));
strcpy(color[n], str);
printf("n = %d %s\n\n", n, color[n]);
n++;
scanf("%s", str);
}
for(i = n - 1; i >= 0; i--){
printf("%s ", color[i]);
free(color[i]);
}
return 0;
}
strlen(str) + 1 结束有/0 所以这里 +1