为什么"do"的'd'会消失

在dev-cpp中运行时,输入5个英语单词,程序会对其排序,但输入例如while do printf scanf hhh后,输出的“do”没有“d”,下面是代码。

#include<stdio.h>
#include<string.h>
int main()
{
char words[5][15]={{'\0'},{'\0'},{'\0'},{'\0'},{'\0'},},temp[15]={};
int i,j,k;
scanf("%s",words[0]);
for(i=1;i<5;i++)
{

    scanf("%s",&temp);
    j=i-1;
     while(strcmp(temp,words[j])<0)
     
     {
         strcpy(words[j+1],words[j]);
         j--;
     }
     strcpy(words[j+1],temp);
}
for(i=0;i<5;i++)
printf("%s\n",words[i]);
printf("\n"); 
return 0;

}

for(i=1;i<=5;i++)
i<=5
while()里j--是什么操作,j<0不就越界了