0% found this document useful (0 votes)
4 views1 page

Text File Handling - Questions

The document contains a list of programming tasks related to text file handling using a file named 'data.txt'. It includes tasks such as creating, reading, and modifying files, as well as counting lines, words, characters, and vowels. Additionally, it covers searching for words, removing blank lines, and reversing file contents.

Uploaded by

ssumathi04
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Text File Handling - Questions

The document contains a list of programming tasks related to text file handling using a file named 'data.txt'. It includes tasks such as creating, reading, and modifying files, as well as counting lines, words, characters, and vowels. Additionally, it covers searching for words, removing blank lines, and reversing file contents.

Uploaded by

ssumathi04
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

TEXT FILE HANDLING – QUESTIONS

File name: [Link]

[Link] a program to create a text file and write data into it.

[Link] a program to read the contents of a file.

[Link] a program to read a file line by line.

[Link] a program to append data to a file.

5. Write a program to count the number of lines in a file.

[Link] a program to count the number of words in a file.

7. Write a program to count the number of characters in a file.

8. Write a program to count the number of vowels in a file.

[Link] a program to copy contents of one file to another.

10. Write a program to display lines starting with ‘A’.

[Link] a program to search for a word in a file.

[Link] a program to count uppercase and lowercase letters.

[Link] a program to count digits in a file.

14. Write a program to remove blank lines from a file.

15. Write a program to replace a word in a file.

[Link] a program to display the longest line in a file.

[Link] a program to read first N characters from a file.

[Link] a program to count occurrence of a character in a file.

19. Write a program to display lines containing a given word.

20. Write a program to reverse the contents of a file.

You might also like