30 likes | 70 Views
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
E N D
Write a program which given an input text/tutorialoutletdotcom For more course tutorials visit tutorialoutletdotcom
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.
Write a program which given an input text/tutorialoutletdotcom