feof() doesn't work as you'd expect. I'd replace it as shown below.
Code:
include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
int main(void){
FILE *fp;
int choice,num,i,j,len,tries=7,found=0,got;
char word[15];
char guessWord[15];
char *ptrchar;
char guess;
if((fp=fopen("wordlist.txt","r"))==NULL){
printf("Cannot open File.\n");
}
printf("Choose a mystery word by entering a number from 0-9:");
scanf("%d",&num);
while((got=fscanf(fp,"%d%s",&choice, word)) > 1) {
if(num==choice){
len=strlen(word);
break;
}
}
fclose(fp);
printf("Your Mystery Word has %d letters:\t %s",len,word);
for(i=0;i<len;i++){
printf("*");
guessWord[i]='*';
}
printf("\n");
guessWord[i]='\0';
for(j=0;j<tries;j++){
//_gotoxy(10,1);
printf("You Have %d tries left.\n",tries-j);
printf("Enter a letter: \n");
scanf(" %c",&guess);guess=toupper(guess);
for(i=0;i<len;i++) {
if(word[i]==guess) {
guessWord[i]=guess;
}
}
printf("%s\n",guessWord);
}
return 0;
}
Try that, and see if it will help.