Can someone please tell me what is wrong with strcmp? I don't understand why I am getting a segmentation fault when comparing array of strings and string.
char *strings[100];
char nam[100];
int g = 0;
while (fscanf(pFile, "%s %d", nam, &val) !=EOF)
{
strings[k] = nam;
printf(" string is %s .\n", strings[k]);
k++;
g = strcmp (strings[i], nam);
printf("g is %d \n", g);
}