CBSE Class 12 Computer Science
Question 61 of 136
Data File Handling — Question 26
Back to all questionsstring, str()
Reason — For storing numeric data in a text file, it needs to be converted into a string using the 'str()' function. This is because text files store data in the form of characters, and converting numeric data to a string allows it to be written to the file as a sequence of characters.