i have below code, that reads and gives as output words from text file. How can i shuffle these words?
#include <stdio.h>
#include <string.h>
int main()
{
/* Declare and initialise variable */
char message[10][150], buffer[150];
int i = 0;
FILE *file_in;
file_in = fopen("test.txt", "r");
/* Stores and prints the data from the string */
while (fgets(buffer, 150, file_in)) {
strcpy(message[i], buffer);
printf("%s", message[i]);
i++;
}
getchar();
return 0;
}