Quick Print – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
Solved Problem Solved Problem#CPP#5039

Problem Statement - Displaying and counting lines starting with a certain character

Write a program to display the lines starting with character ‘A’ or ‘a’ in the file “PROG.TXT” that contains following text. Also display the count of such lines.

A programmer should always be hardworking.
For that matter everyone should be hardworking.
A programmer is always under pressure.
Yes! not everyone is always under pressure.

Solution

		 

Run Output

A programmer should always be hardworking.
A programmer is always under pressure.
No. of lines starting with character A = 2