page-banner
Chapter-7 File Processing
Q1.
निम्नलिखित में से कौन सी फाइल किसी टेक्स्ट एडिटर में खोली जा सकती है?<break-line><break-line>Which of the following file can be opened in any text editor?
A. Binary
B. text
C. Both of the above
D. None of these
View Answer
Q2.
कौन सा कथन एक फ़ाइल (फ़ाइल ऑब्जेक्ट "f") से 5 अक्षर पढ़ेगा?<break-line><break-line>Which statement will read 5 characters from a file (file object “f”)?
A. f.read()
B. f.read(5)
C. f.reads(5)
D. None of these
View Answer
Q3.
tell() मेथड आपको फ़ाइल के भीतर वर्तमान स्थिति बताती है।<break-line><break-line>The tell() method tells you the current position within the file.
A. True
B. False
C. can’t say
D. None of these
View Answer
Q4.
बाइनरी फाइल में रीड और राइट दोनों के लिए एक फ़ाइल खोलता है।<break-line><break-line>Opens a file for both reading and writing in binary format.
A. rb+
B. Rb-
C. r
D. w
View Answer
Q5.
कर्रेंट वर्किंग डायरेक्टरी को प्रदर्शित करती है।<break-line><break-line>Method displays the current working directory.
A. tell()
B. getcwd()
C. seek()
D. dir()
View Answer