I\'m attempting to write a program that will generate a text file with every possible permutation of the alphabet from one character up to twenty-nine characters. I\'ve chosen 2
The word "permutation" usually means that each letter appears exactly once, so it would be impossible to generate any permutation with more than 26 letters. Anyway, since the number of generated strings is too big, you can use random strings instead (the following is C code):
char s[30];
int p;
for (;;) // repeat forever: you cannot use a realistic iteration limit anyway
{
for (p = 0; p < 29; ++p)
s[p] = 'a' + rand() % 26;
s[29] = '\0';
puts(s);
}