Wednesday, 1 May 2019

Assignment on Text File Handling Class-12




ASSIGNMENT -- TEXT FILE HANDLING
CLASS-12-- COMPUTER SCIENCE


1. Write a user defined function in C++ to read the content from a text file MYbook.txt, count and display the number of blank spaces present in it.

2. Write a menu driven program count the number of uppercase alphabets, lowercase alphabets and alphabets present in a text file “STORY.TXT”.

3. Write a function in C++ to count and display the number of words starting with a vowel present in a given text file “ABC.TXT”.

4.Write a function which reads an already existing file “text1.txt” and write digits (0-9) in to a new text file “DIGIT.TXT” and non digit  into NONDIG.TXT.

5.Write a function in C++ to count the number of lines present in a text file“STORY.TXT”.

6.Assuming that a text file named TEXT1.TXT already contains some text written into it. Write a function named vowelwords(), that reads the file TEXT1.TXT and creates a new file named TEXT2.TXT , which shall contain only those words from the file TEXT1.TXT which don’t start with an uppercase vowel.

7.Write a program that reads a text file and print it on a printer.

8. Write a program that displays the size of a text file in bytes.

9. Write a function in C++ to print the count of the word “is” as an independent word in a text file. DIALOGUE.TXT.

10.Write an interactive C++ program to read a text file and display the following :(i) Frequency table of all the alphabetic characters  (ii)Number of numeric characters present in the file.

11. :Write a program  in C++ to count and display the number of lines starting with alphabet ‘A’ in a text file “MYFILE.TXT”.