Class 12 : File Handling Set 4

Consider the file poem.txt which contains following data:
             Why?

we work, we try to be better
we work with full zest
but, why is that we just don’t know nay letter
we still give our best
we have to steal
But, why is that we still don’t get a meal.

1.
Write a program to read the complete file in a list.

2.
Write a program to display size of the file in bytes.

3.
Write a program to display number of lines in the file.

4.
Write a program to count and display lines starting with letter ‘w’.

5.
Write a program to count and display number of words in the file, also print length of each word.

Number Of Visitors

0125597