Report Bug

QusThe syntax of seek() is: file_object.seek(offset [, reference_point]) What does the reference_point indicate? Qusseek () का सिंटैक्स है: file_object.seek(offset [, Reference_point]) रेफरेंस_पॉइंट क्या दर्शाता है?


A. reference_point indicates the current position of the file object
B. reference_point indicates the starting position of the file object
C. reference_point indicates the ending position of the file object
D. None of the above


Solution
B. reference_point indicates the starting position of the file object



Explanation


In the seek() method of a file object in Python, the offset parameter is the number of bytes to move the file pointer, and the optional reference_point parameter indicates the reference point or the position from where the offset should be measured. The reference_point parameter is optional, and if not provided, it defaults to the beginning of the file (offsets are measured from the beginning).


The reference_point parameter can take one of the following values:


  • 0 (default): The offset is measured from the beginning of the file.
  • 1: The offset is measured from the current file position.
  • 2: The offset is measured from the end of the file.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad