Code:It gets words from a file, each word from each line and i want to find out if the word "and" is in the list... can someone help me?
int z=0;
char *word="and";
while(fgets(c,sizeof(c),fq)!=NULL)
{
if(strcmp(c,word)==0)
{
printf("word found");
z++;
}
printf("h%s\n",c);
if(head==NULL){
head=add(head,c);
tail = head;
}
else{
tail = add(tail,c);
}
printf("g%s listed: ",tail->word);
}