Python : Database Connectivity in Python

कौन सा स्टेटमेंट फाइल पॉइंटर को वर्तमान स्थिति से 10 बाइट पीछे ले जायेगा| , Which statement will move file pointer 10 bytes backward from current position ?

कौन सा स्टेटमेंट फाइल पॉइंटर को वर्तमान स्थिति से 10 बाइट पीछे ले जायेगा|

Which statement will move file pointer 10 bytes backward from current position ?
A. f.seek(-10, 0)

B. f.seek(10, 0)

C. f.seek(-10,1)

D. उपरोक्त में से कोई नहीं (none of the above)



Correct Answer :

C. f.seek(-10,1)



Explanation

The second parameter in seek() function indicates to the position from where the file object to start with. This parameter accepts following  values: 

0 - to set the file handler at the beginning of the file. 

1 - to set the file handler to the current position.


CCC Online Test , CCC MCQ Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz career counselling in allahabad Website development Company in Allahabad