हिंदी

What does the seekg() and seekp() functions do?

Advertisements
Advertisements

प्रश्न

What does the seekg() and seekp() functions do?

लघु उत्तरीय
Advertisements

उत्तर

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
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Data File Handling - EXERCISE [पृष्ठ १४५]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
अध्याय 7 Data File Handling
EXERCISE | Q 8. | पृष्ठ १४५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×