Exercise - File Handling

  1. WAP to count and display characters from a file.

    Solution: C

  2. WAP to count number of characters, words, lines and length of a file.
  3. WAP to count number of vowels from a file.
  4. WAP to input file name from user and display its contents
  5. WAP to copy contents of one file into another.
  6. WAP to merge contents of two files into another file.

    Solution: C

  7. WAP to delete line from a file.

    Solution: C

  8. WAP to replace a specific line with another text in a file.

    Solution: C

Advertisement