🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

File Processing

Question: 51 Report Error

कौन सा कथन फ़ाइल से एक पंक्ति लौटाएगा (फ़ाइल ऑब्जेक्ट 'एफ' है)?

Which statement will return one line from a file (file object is ‘f’) ?

A)
B)
C)
D)

Question: 52 Report Error

जब हम किसी फ़ाइल को read मोड में खोलने का प्रयास करते हैं जो मौजूद नहीं है तो निम्नलिखित में से कौन सी त्रुटि वापस आती है?

Which of the following error is returned when we try to open a file in read mode which does not exist ?

A)
B)
C)
D)

Question: 53 Report Error

जब हम फ़ाइल को एपेंड मोड में खोलते हैं तो फ़ाइल पॉइंटर फ़ाइल के _________ पर होता है।

When we open file in append mode the file pointer is at the _________ of the file.

A)
B)
C)
D)

Question: 54
Verified by Expert

यदि हम किसी फ़ाइल को राइट मोड में खोलते हैं और फ़ाइल मौजूद नहीं है, तो कौन सी त्रुटि उत्पन्न होगी?

If we open a file in write mode and file does not exists, which of the error will generate ?

A)
B)
C)
D)
Explanation
When you open a file in write mode ('w') and the file does not exist, no error is generated. Instead, the system automatically creates a new file with the specified name.

Correct Answer: D) None of these


Question: 55
Verified by Expert

सीएसवी का फुल फॉर्म क्या है?

What is full form of CSV ?

A)
B)
C)
D)

Question: 56
Verified by Expert

कथन 3 के लिए उत्तर चुनें.

Choose the answer for statement 3.

import ___________ # statement 1 
rec = [ ] 
while True: 
rn = int(input("Enter")) 
nm = input("Enter") 
temp = [rn, nm] 
rec.append(temp) 
ch = input("Enter choice (Y/N)") 
if ch.upper == "N": 
break 
f = open("stud.dat", "____________") #statement 2
 __________ .dump(rec, f)  #statement 3 
_______.close( ) # statement 4
A)
B)
C)
D)
Explanation
In the Python script, the code is using the pickle module to perform serialization (storing data structures like a list into a binary file). Statement 1: Requires import pickle to load the necessary library. Statement 3: The pickle.dump() function is the specific method used to write the serialized representation of the object (rec) to the open file object (f). The syntax is pickle.dump(object, file_handle).

Correct Answer: B) pickle


Question: 57 Report Error

कौन सा कथन फ़ाइल से एक पंक्ति लौटाएगा (फ़ाइल ऑब्जेक्ट „f‟ है)?

Which statement will return one line from a file (file object is „f?) ?

A)
B)
C)
D)

Question: 58 Report Error

निम्नलिखित में से कौन सा फ़ंक्शन दो तर्क लेता है?

Which of the following function takes two arguments ?

A)
B)
C)
D)

Question: 59 Report Error

कौन सा कथन एक फ़ाइल (फ़ाइल ऑब्जेक्ट "f") से 5 अक्षर पढ़ेगा?

Which statement will read 5 characters from a file(file object "f") ?

A)
B)
C)
D)

Question: 60 Report Error

निम्नलिखित में से कौन फ़ाइल की संपूर्ण सामग्री (फ़ाइल ऑब्जेक्ट 'f') को पढ़ेगा?

Which of the following will read entire content of file (file object ‘f’) ?

A)
B)
C)
D)

Question: 61
Verified by Expert

निम्नलिखित में से किसमें डेटा स्थायी रूप से संग्रहीत किया जाता है?

In which of the following, data is stored permanently ?

A)
B)
C)
D)
Explanation
Data stored in files is kept on secondary storage (such as a Hard Disk Drive or SSD), which is non-volatile. This means the information remains permanently stored until it is manually deleted or overwritten.

Correct Answer: B) File


Question: 62 Report Error

__________ फ़ंक्शन फ़ाइल पॉइंटर की वर्तमान स्थिति लौटाता है।

__________ function returns the current position of file pointer.

A)
B)
C)
D)

Question: 63 Report Error

यदि फ़ाइल मौजूद नहीं है तो कौन सा मोड एक नई फ़ाइल बनाता है?

Which mode creates a new file if the file does not exist ?

A)
B)
C)
D)

Question: 64
Verified by Expert

एक _____________ जानकारी को ASCII या यूनिकोड वर्णों की एक धारा के रूप में संग्रहीत करता है अर्थात मानव पठनीय।

A _____________ stores information in the form of a stream of ASCII or unicode characters i.e. human readable.

A)
B)
C)
D)
Explanation
A text file is a type of computer file that contains plain text, organized as a sequence of lines. It is human-readable, simple, and typically encoded using ASCII or UTF-8. Examples: Common examples include .txt, .csv, .html, and source code files, which can be edited with programs like Notepad.

Correct Answer: A) Text file


Question: 65 Report Error

कौन सा कथन फ़ाइल पॉइंटर को shuru स्थिति से 10 बाइट्स aage ले जाएगा?

Which statement will move file pointer 10 bytes forward from begnining position ?

A)
B)
C)
D)

Question: 66
Verified by Expert

निम्नलिखित में से कौन सी त्रुटि दिए गए कोड द्वारा लौटाई जाती है?

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

>>> f = open(“test.txt”,”w”) 
>>> f.write(345)
A)
B)
C)
D)
Explanation
In Python, the write() method for files opened in text mode expects a single string argument. Passing an integer (like 345) instead of a string results in a TypeError because the function cannot automatically convert numeric types to strings.

Correct Answer: B) Type Error


Question: 67 Report Error

seek() में, मान _______________ वर्तमान फ़ाइल स्थिति पर संदर्भ बिंदु निर्धारित करता है।

In seek(), value _______________ sets the reference point at the current file position.

A)
B)
C)
D)

Question: 68 Report Error

बाइनरी फ़ाइल में डेटा पढ़ने के लिए निम्नलिखित में से किस फ़ंक्शन का उपयोग किया जाता है?

Which of the following function is used to read the data in binary file

A)
B)
C)
D)

Question: 69 Report Error

काजल ने एक फ़ाइल को एक खास मोड में खोला। फ़ाइल खोलने के बाद, वह उस मोड को भूल गया। उस मोड के बारे में रोचक तथ्य ये हैं कि "अगर फ़ाइल मौजूद नहीं है, तो एक नई फ़ाइल बनाई जाएगी" और "उस मोड में फ़ाइल खोलने पर फ़ाइल हैंडल फ़ाइल के अंत में होगा।" उसे सही मोड पहचानने में मदद करें।

file" Help him to identify the correct mode.

A)
B)
C)
D)

Question: 70 Report Error

सीक() में, मान वर्तमान फ़ाइल स्थिति पर संदर्भ बिंदु निर्धारित करता है।

In seek(), value sets the reference point at the current file position

A)
B)
C)
D)

Question: 71 Report Error

सीएसवी का पूर्ण रूप है

The full form of CSV is

A)
B)
C)
D)

Question: 72 Report Error

जब हम किसी फ़ाइल को read मोड में खोलने का प्रयास करते हैं जो मौजूद नहीं है तो निम्नलिखित में से कौन सी त्रुटि वापस आती है

Which of the following error is returned when we try to open a file in read mode which does not exist

A)
B)
C)
D)

Question: 73 Report Error

जब हम फ़ाइल को एपेंड मोड में खोलते हैं तो फ़ाइल पॉइंटर फ़ाइल के पर होता है।

When we open file in append mode the file pointer is at the of the file.

A)
B)
C)
D)

Question: 74 Report Error

निम्न में से कौन-सा कथन binary files के लिए सही नहीं है?

Which of the following is not a correct statement for binary files?

A)
B)
C)
D)

Question: 75 Report Error

Python CSV module में delimiter character के बारे में कौन-सा कथन सही है

In Python’s CSV module, which of the following is true about delimiter characters

A)
B)
C)
D)

Question: 76 Report Error

CSV files के साथ काम करने के लिए कौन-सा Python module उपयोग होता है

Which Python module is used to work with CSV files

A)
B)
C)
D)

Question: 77 Report Error

निम्न कोड का आउटपुट क्या होगा

What will be the output of the following code

print("Hello "+"Python"
A)
B)
C)
D)

Question: 78 Report Error

हर फ़ाइल की एक पहचान होती है। इसे क्या कहा जाता है

Every file has its own identity associated with it. This is known as

A)
B)
C)
D)

Question: 79 Report Error

निम्न में से किस फ़ाइल प्रकार में बड़े डाटा को स्टोर किया जा सकता है

Which of the following file types allows you to store large data files in the computer memory

A)
B)
C)
D)

Question: 80 Report Error

निम्नलिखित कथन क्या करता है

What does the following statement do

x = open('python.bat', 'rb')
A)
B)
C)
D)

Question: 81
Verified by Expert

यदि हम फ़ाइल खोलते समय फ़ाइल मोड निर्दिष्ट नहीं करते हैं, तो फ़ाइल मोड में खुलेगी

If we do not specify file mode while opening a file, the file will open in mode

A)
B)
C)
D)
Explanation
If you do not specify a file mode while opening a file, the file will open in read mode by default.

Correct Answer: A) read


Question: 82
Verified by Expert

डेटा फाइल को केवल पढ़ने के लिए किस मोड में खोला जाता है

In which mode is a data file opened for reading only

A)
B)
C)
D)

Latest Updates