Hi,
Still unsure how this works, i do not understand what you mean when you say alter string format in scanf() to be more secure. I am not sure what this code is doing, it does end the program however prints characters to the screen.
Thanks,
Mike
Code:
#include <stdio.h>
#include <string.h>
main()
{
char word[10][100];
int a, x=0;
for(a=0; a<10; a++)
{
printf("enter a word\n");
scanf("%s", word[x]);
if(feof(stdin))
break;
x=x+1;
}
x=0;
printf("the word list is:\n");
for(a=0; a<10; a++)
{
printf("%s\n", word[x]);
x=x+1;
}
}