CBSE Computer Science - Revision Tour(Solved) CBSE Guess > eBooks > Class XII > CBSE Computer Science Data File Handling Solved Revision Tour By Mr. Ravi Kiran COMPUTER SCIENCE DATA FILE HANDLING 4.b) Write a function in C++ to print the count
of the word the as an independent word in a
text file STORY.TXT. For example,if the content of the file STORY.TXT is There was a monkey in the zoo.The monkey was very naughty. Then the output of the program should be . 2 Solution:Dear Children, try this answer.
4.c) Given a binary file SPORTS.DAT,containg records of the following structure type :
Write a function in C++ that would read contents from the file SPORTS.DAT and creates a file named ATHLETIC.DAT copying only those records from SPORTS.DAT where the event name is “Athletics”. Solution:
DELHI : 2006 4.a)
What is the output if the file content before the execution of the program is the string “ABC”(Note that “ “ are not part of the file). Ans) 1 (Since, the file is opened in out mode, it
looses all the previous content, if the file mode is app, then result will be 4)
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] ) |
|