Hi i am writing this function to read a txt file where there's two
line of text
Name Surname
ID_NUMBER
and usig the following file_read () i want to display it on the screen and the following is the code that i am using any idea on why is not working ?
file_read()
{
FILE *fp;
char Name[30];
fp = fopen("id.txt","r");
if ((fp = fopen("id.txt","r")) == NULL)
{
printf("Unabale to open id.txt file \n");
exit(1);
}
while(fgets,(Name,30,fp) != NULL){
}
fclose(fp);
}
Thank you !