Advertisements
Advertisements
Question
What does the seekg() and seekp() functions do?
Short Answer
Advertisements
Solution
seekg() and seekp() are C++ file-stream functions:
seekg()moves the get pointer, which controls the position for reading.seekp()moves the put pointer, which controls the position for writing.
In Python, the corresponding operation is performed using file.seek(offset). The current position is obtained using file.tell().
shaalaa.com
Is there an error in this question or solution?
