Fseek a txt to print by character using fgetc

45 Views Asked by At
fseek(exsist, start, end);
    while(count < end)
    {
        if(feof(exsist)) break;
        c = fgetc(exsist);
        printf("%c",c);
        if(feof(exsist)) break;
        ++count;

In theory I feel like this should print character by character until either eof or the intended end. Yet I am getting nothing printed to the terminal. I have been opening the file because I have a check above if it doesn’t see it.

0

There are 0 best solutions below