se il file è piccolo puoi usare file. Altrimenti usare fgets per leggere una riga e con ftell prendere la posizione.