You need to initialize the arr_word array with a null terminator first because an uninitialized array has the potential to store garbage values.
And also, you need to added an additional condition to break the loop when it encounters a null terminator in the sentence ("line" array). This prevents the loop from storing a non-existing character, which could result in the output of a garbage value.
#include <stdio.h>
#include <string.h>
int main()
{
char line[1000];
scanf("%[^\n]%*c", line);
int l=strlen(line),i,count=0;
for(i=0;i<l;i++){
if(line[i]==' '){
count+=1;
}
}
char arr_word[count+1][26];
int j,ind=0;
for(i=0; i <count+1; i++){
for(j = 0; j <26; j++){
arr_word[i][j] = '\0';
}
}
for(i=0;i<count+1;i++){
for(j=0;j<26;j++){
if(line[ind]==' ' || line[ind]=='\0'){
ind++;
break;
}
arr_word[i][j]=line[ind];
ind++;
}
}
for(i=0; i <count+1; i++){
for(j = 0; j <26; j++){
printf("%c", arr_word[i][j]);
}
printf("\n");
}
return 0;
}