Potresti usare fseek e funzioni correlate