I am just wondering why this code produces different results
#include <stdio.h>
#include <string.h>
char names[5][25],temp[25];
int x;
void main()
{
for (x=0;x<=4;x++)
{
scanf("%s",names[x]);
}
for (x = 0;x<=4;x++)
{
printf("%s",names[x]);
}
// the above works...