I'm too lazy to describe the problems. Here's a rewrite. I couldn't conform to your "maximum number of spaces humanly possible" policy. If you find the following normal spacing hard to read, maybe you need glasses.
Code:
#include <stdio.h>
#include <string.h>
#define MAXWORDS 100
#define MAXWORDLEN 20
void permute(char input[][MAXWORDLEN], int start, int end);
void swap(char *x, char *y);
int main() {
char words[MAXWORDS][MAXWORDLEN], input[MAXWORDLEN];
int n = 0;
while (1) {
int i, ch;
printf("Enter a word: ");
for (i = 0; i < MAXWORDLEN-1 && (ch = getchar()) != '\n'; i++)
input[i] = ch;
input[i] = '\0';
if (strcmp(input, "GO") == 0)
break;
if (n >= MAXWORDS)
break;
strcpy(words[n++], input);
}
permute(words, 0, n);
return 0;
}
void permute(char words[][MAXWORDLEN], int start, int end) {
if (start == end) {
for (int i = 0; i < end; i++)
printf("%s ", words[i]);
putchar('\n');
return;
}
for (int i = start; i < end; i++) {
swap(words[start], words[i]);
permute(words, start + 1, end);
swap(words[start], words[i]);
}
}
void swap(char *x, char *y) {
char temp[MAXWORDLEN];
strcpy(temp, x);
strcpy(x, y);
strcpy(y, temp);
}