page-banner
Chapter-7 File Processing
Q41.
कौन सा कथन फ़ाइल पॉइंटर को अंतिम स्थिति से 10 बाइट पीछे ले जाएगा?<break-line><break-line>Which statement will move file pointer 10 bytes backward from last position?
A. f.seek(-10, 2)
B. f.seek(10, 0)
C. f.seek(-10, 1)
D. None
View Answer
Q42.
निम्नलिखित का आउटपुट क्या होगा?<break-line><break-line>What will be the output of the following?<pre><code>import sys sys.stdout.write('Welcome\n') sys.stdout.write('All\n')</code></pre>
A. Welcome All
B. Welcome<break-line>All
C. Compilation Error
D. Runtime Error
View Answer
Q43.
निम्नलिखित में से कौन सी त्रुटि दिए गए कोड द्वारा लौटाई गई है<break-line><break-line>Which of the following error is returned by the given code?<pre><code>>>> f = open("test.txt", "w") >>> f.write(345)</code></pre>
A. Syntax Error
B. Type Error
C. String Error
D. Run Time Error
View Answer
Q44.
कौन सा कथन फ़ाइल से एक पंक्ति लौटाएगा (फ़ाइल ऑब्जेक्ट 'f' है)<break-line><break-line>Which statement will return one line from a file (file object is ‘f’)
A. f.readlines()
B. f.readline()
C. f.read()
D. f.line()
View Answer
Q45.
f.read(5) एक फ़ाइल (फ़ाइल ऑब्जेक्ट 'f') से ………… पढ़ेगा।<break-line><break-line>f.read(5) will read …………… from a file (file object ‘f’).
A. 5 characters
B. 5 words
C. 5 lines
D. None of these
View Answer