Test Index
CBSE Class 12 Computer Science 2024 Paper Compartment
© examsnet.com
Question : 34 of 35
Marks:
+1,
-0
(a) (i) What is the main purpose of
seek() and tell() method ?(ii) Consider a binary file, Cinema.dat containing information in the following structure :[Mno, Mname, Mtype]Write a function, search_copy(), that reads the content from the file Cinema.dat and copies all the details of the "Comedy" movie type to file named movie.dat.OR(b) (i) Give one difference between write() and writeline() function in text file.(ii) A Binary file, "Items.dat" has the following structure :[Icode, Description, Price]WhereIcode - Item codeDescription - Detail of itemPrice - Price of itemWrite a function
Add_data(), that takes Icode, Description and Price from the user and writes the information in the binary file "Items.dat".
Go to Question: