First you need to create an array of strings.
char arrayOfWords[NUMBER_OF_WORDS][MAX_SIZE_OF_WORD];
Then you need to enter a string into an array
int i; for (i=0; i<NUMBER_OF_WORDS; i++) { scanf ("%s" , arrayOfWords[i]); }
Finally, in orerer for printing use
for (i=0; i<NUMBER_OF_WORDS; i++) { printf ("%s" , arrayOfWords[i]); }
source share