#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char a[1000];
char b[1000][1000];
gets(a);
char *p;
p = strtok(a," ");
int i;
while(p){
//printf("%s\n",p);
strcpy(b[i],p);
p = strtok(NULL, " ");
i++;
}
int m;
for(m = i-1;m >=0;m--){
printf("%s ",b[m]);
}
return 0;
#include <stdlib.h>
#include <string.h>
int main(){
char a[1000];
char b[1000][1000];
gets(a);
char *p;
p = strtok(a," ");
int i;
while(p){
//printf("%s\n",p);
strcpy(b[i],p);
p = strtok(NULL, " ");
i++;
}
int m;
for(m = i-1;m >=0;m--){
printf("%s ",b[m]);
}
return 0;
}