I am new to C and i am trying to read a .txt file. I am using a windows 10 machine. I have created the file and i am trying to read it. I will share all my code below.
int main()
{
char firstline[255];
FILE * fpointer = fopen("klinks.txt", "r");
fgets(firstline, 255, fpointer);
printf("%s", firstline);
fclose(fpointer);
return 0;
}
Below is the message showing on the console terminal. I have no idea why.
h┐
Process returned 0 (0x0) execution time : 0.026 s
Press any key to continue.