LIVE Course for free

Rated by 1 million+ students
Get app now
0 votes
14.4k views
in Computer by (70.9k points)

Write a user-defined function named Count() that will read the contents of text file named “Report.txt” and display the count of the number of lines that start with either "I" or "M".

E.g. In the following paragraph, there are 3 lines starting with "I" or "M":

“India is the fastest growing economy.

India is looking for more investments around the globe.

The whole world is looking at India as a great market.

Most of the Indians can foresee the heights that India is capable of reaching.”

1 Answer

+1 vote
by (75.8k points)
selected by
 
Best answer

void Count()

{

Related questions

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...