Python - File Handling And I O
Questions No: 1/50

Which of the following declarations is incorrect?
निम्नलिखित में से कौन सी डेक्लरेशंस गलत है?

Questions No: 2/50

What happens if the file does not exist?

f = open("abc.txt", "r")

Questions No: 3/50

What happens if file opened in write mode already exists?
यदि राइट मोड में खोली गई फाइल पहले से मौजूद हो तो क्या होगा?

Questions No: 4/50

How can you write data to a file in Python?
आप पायथन में किसी फ़ाइल में डेटा कैसे लिख सकते हैं?

Questions No: 5/50

What does EOF stand for?
EOF का पूरा नाम क्या है?

Questions No: 6/50

Which statement will open file data.txt in append mode?
कौन सा स्टेटमेंट data.txt फाइल को एपेंड मोड में खोलेगा?

Questions No: 7/50

What is full form of CSV?
सीएसवी का फुल फॉर्म क्या है?

Questions No: 8/50

What is unpickling?
अनपिकलिंग क्या है

Questions No: 9/50

Which of the following error is returned by the given code ?

f = open("test.txt","w")
f.write(345)

Questions No: 10/50

Work of tell() method in file processing is
फाइल प्रोसेसिंग में tell() फंक्शन का कार्य है

Questions No: 11/50

which of the following will read entire content of file (file object 'f')?
निम्नलिखित में से कौन फ़ाइल (file object 'f') की संपूर्ण सामग्री को पढ़ेगा ?

Questions No: 12/50

What does the 'r' mode signify when opening a file using open() in Python?
पायथन में ओपन() का उपयोग करके फ़ाइल खोलते समय 'r' मोड क्या दर्शाता है?

Questions No: 13/50

The syntax used to rename a file :
फ़ाइल का नाम बदलने के लिए प्रयुक्त सिंटैक्स:

Questions No: 14/50

What is the use of seek() method in files?
फाइलों में seek() फंक्शन का क्या उपयोग है?

Questions No: 15/50

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

Questions No: 16/50

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

Questions No: 17/50

Which of the following functions is used to open a file in Python?
पायथन में फ़ाइल खोलने के लिए निम्नलिखित में से किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 18/50

In which format python file considered
पाइथन फ़ाइल को किस प्रारूप में माना जाता है

Questions No: 19/50

Which of the following is not a correct mode to open a file ?
फ़ाइल खोलने के लिए निम्न में से कौन सा सही मोड नहीं है?

Questions No: 20/50

Which denotes file binary mode?
फ़ाइल बाइनरी मोड को कौन दर्शाता है?

Questions No: 21/50

in python which function is used to read CSV file
पायथन में CSV फ़ाइल को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 22/50

What is the output?

f = open("test.txt", "w")
f.write("Python")
print(f.tell())
f.close()

Questions No: 23/50

What will be the output of the following code ?

f=open("demo.txt","w+")
f.write("Welcome to python")
f.seek(5)
a=f.read(5)
print(a)

Questions No: 24/50

which is a correct way to open a file in python
पायथन में फ़ाइल खोलने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 25/50

Which function reads all lines into a list from file?
कौन सा फंक्शन फाइल से सभी लाइनों को सूची में पढ़ता है?

Questions No: 26/50

Which mode creates a file if it does not exist and appends data?
कौन सा मोड किसी फाइल के मौजूद न होने पर उसे बनाता है और उसमें डेटा जोड़ता है?

Questions No: 27/50

What does readlines() method return ?
रीडलाइन () मेथड क्या रिटर्न करता है?

Questions No: 28/50

Which of the following is an invalid mode?
निम्न में से कौन सा अमान्य मोड है?

Questions No: 29/50

Which one is not the attribute of a file ?
इनमें से कौन एक फाइल की विशेषता नहीं है ?

Questions No: 30/50

What keyword is used in Python to raise exceptions?
एक्सेप्शन उत्पन्न करने के लिए पायथन में किस कीवर्ड का उपयोग किया जाता है?

Questions No: 31/50

What is the default mode for files in Python?
पायथन में फ़ाइलों के लिए डिफ़ॉल्ट मोड क्या है?

Questions No: 32/50

When we open file in append mode the file pointer is at the ______ of the file.
जब हम अपेंड मोड में फाइल खोलते हैं तो फाइल पॉइंटर फाइल के _____ पर होता है।

Questions No: 33/50

Which mode creates a file if it does not exist?
कौन सा मोड ऐसी फ़ाइल बनाता है जो पहले से मौजूद न हो?

Questions No: 34/50

Which one of the following is not attributes of file?
निम्नलिखित में से कौन सा फाइल का ऐट्रीब्यूट नहीं है?

Questions No: 35/50

What will be written to the file?

f = open("test.txt", "w")
f.write("ABC")
f.write("DEF")
f.close()

Questions No: 36/50

Identify the correct function call to read first 5 character of the file from the beginning
शुरुआत से फ़ाइल के पहले 5 अक्षर को पढ़ने के लिए सही फ़ंक्शन कॉल की पहचान करें

Questions No: 37/50

Which method is used to read the entire content of a file as a string in Python?
पायथन में फ़ाइल के पूरे डाटा को स्ट्रिंग के रूप में पढ़ने के लिए किस फंक्शन का उपयोग किया जाता है?

Questions No: 38/50

A Function used for writing data in the binary format :
बाइनरी फॉर्मेट में डेटा लिखने के लिए उपयोग किया जाने वाला एक फंक्शन:

Questions No: 39/50

f.read(5) will read________from a file (file object 'f')
f.read(5) एक फ़ाइल से________ पढ़ेगा (file object 'f')

Questions No: 40/50

What will be the output of : infile.read(2)
निम्नलिखित कोड का आउटपुट क्या होगा? infile.read(2)

Questions No: 41/50

Which of the following is not a valid mode to open a file?
निम्नलिखित में से कौन सा फ़ाइल खोलने के लिए वैध मोड नहीं है?

Questions No: 42/50

What does tell() return?
tell() फ़ंक्शन क्या लौटाता है?

Questions No: 43/50

Which statement will return one line from a file (file object is f) ?
कौन सा स्टेटमेंट फ़ाइल (file object is 'f) से एक पंक्ति प्रस्तुत करेगा |

Questions No: 44/50

Which function is used to read all the characters from file?
फ़ाइल से सभी वर्णों को पढ़ने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 45/50

What is mean by 'rb' mode when working with binary file in python
पायथन में बाइनरी फ़ाइल के साथ काम करते समय 'rb' मोड का क्या अर्थ है?

Questions No: 46/50

what is 'f' in the following statement?

f=open("Data.txt","r")

Questions No: 47/50

Which of the following is the correct way to write multiple lines to a file in Python?
पायथन में किसी फ़ाइल में एक से अधिक पंक्तियाँ लिखने का सही तरीका निम्नलिखित में से कौन सा है?

Questions No: 48/50

In which format Binary file contains information?
बाइनरी फ़ाइल में सूचना किस प्रारूप में होती है?

Questions No: 49/50

What is the pickling?
पिकलिंग क्या है?

Questions No: 50/50

Each line of a text file is terminated by a special character, called the ___
टेक्स्ट फाइल की प्रत्येक पंक्ति को एक विशेष कैरेक्टर द्वारा समाप्त किया जाता है, जिसे ____ कहा जाता है।