1 / 3

Write a program which given an input text/tutorialoutletdotcom

FOR MORE CLASSES VISIT<br>tutorialoutlet<br><br><br><br>a) Write a program which given an input text file, computes and prints:1. the number of characters in the file2. the number of words in the file3. the number of lines in the file.The input file name is specified in the program.Your program should print zeros if the input file does not exist.(Hints: To count the number of lines, it is enough to count the number of ’n’characters.To count the number of words, it is not enough to count the number of ’ ’ charactersas the file may contain consecutive blank characters. One way to compute the

davidw1411
Download Presentation

Write a program which given an input text/tutorialoutletdotcom

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Write a program which given an input text/tutorialoutletdotcom For more course tutorials visit tutorialoutletdotcom

  2. Write a program which given an input text file, computes and prints:1. the number of characters in the file2. the number of words in the file3 • FOR MORE CLASSES VISIT • tutorialoutlet • a) Write a program which given an input text file, computes and prints:1. the number of characters in the file2. the number of words in the file3. the number of lines in the file.The input file name is specified in the program.Your program should print zeros if the input file does not exist.(Hints: To count the number of lines, it is enough to count the number of ’n’characters.

  3. Write a program which given an input text/tutorialoutletdotcom

More Related