const char chars[] = "abcdef ....";
char result[...];
memcpy(result, chars, sizeof(chars));
for (unsigned i = 0; i < (sizeof(chars)-1); ++i) {
unsigned j = rand() % sizeof(chars);
char tmp = result[j];
result[j] = result[i];
result[i] = tmp;
}
将结果写入文本文件时出现问题。