Thursday, 26 May 2016

CLASS - XII ASSIGNMENT ON DATA FILE HANDLING


PROGRAMS ON DATA FILE HANDLING

1.      Write a program in a C++ to read the content of a text file “DELHI.TXT” and display all those lines on screen, which are either starting with ‘D’ or starting with ‘M’.
2.      Write a program in a C++ to count the number of lowercase alphabets and uppercase alphabets present in a text file “BOOK.TXT”.
3.      Assume a text file “coordinate.txt” is already created. Using this file create a C++ program to count the number of words having first character capital.
4.      Write a program to count number of lines from a text files that ends at ‘.’
5.       Write a function in C++ to count the number of alphabets, number of digita, number of white spaces  present in a text file “BOOK.TXT
6.      Write a program in C++ to count the number of vowels present in a text file “BOOK.TXT”.
7.        Assume a text file “Test.txt” is already created. Using this file, write a program  to create three files “LOWER.TXT” which contains all the lowercase vowels and “UPPER.TXT” which contains all the uppercase vowels and “DIGIT.TXT” which contains all digits.
8.        Write a program in a C++ to display the sum of digits present in a text file “Fees.txt”.
9.        Write a program in a C++ to display the product of digits present in a text file “Number.txt”.
10.    Write a program in a C++ to find the largest digit present in a text file “Marks.txt”
11.  Write a program CountYouMe() in C++ which reads the contents of a text file story.txt and counts the words You and Me (not case sensitive).
For example, if the file contains:
You are my best friend.
You and me make a good team.
The function should display the output as
Count for You: 2

Count for Me: 1

No comments:

Post a Comment