SlideShare a Scribd company logo
1 of 1
Download to read offline
*12.13 (Count characters, words, and lines in a file) Write a program that will count the number
of characters, words, and lines in a file. Words are separated by whitespace characters. The file
name should be passed as a command-line argument, as shown in Figure 12.13. 490 Chapter 12
Exception Handling and Text I/O FiGuRE 12.13 The program displays the number of characters,
words, and lines in the given file.

More Related Content

More from JacobQfDNolanr

--php include 'view-header-php'- -- -main- -nav- -h2-Administ.pdf
--php include 'view-header-php'- -- -main-     -nav-      -h2-Administ.pdf--php include 'view-header-php'- -- -main-     -nav-      -h2-Administ.pdf
--php include 'view-header-php'- -- -main- -nav- -h2-Administ.pdf
JacobQfDNolanr
 
-- index-php --php include 'view-header-php'- -- -main- -nav-.pdf
-- index-php --php include 'view-header-php'- -- -main-     -nav-.pdf-- index-php --php include 'view-header-php'- -- -main-     -nav-.pdf
-- index-php --php include 'view-header-php'- -- -main- -nav-.pdf
JacobQfDNolanr
 
(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf
(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf
(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf
JacobQfDNolanr
 

More from JacobQfDNolanr (17)

-What is the purpose of Class Design- - In what ways are classes refin.pdf
-What is the purpose of Class Design- - In what ways are classes refin.pdf-What is the purpose of Class Design- - In what ways are classes refin.pdf
-What is the purpose of Class Design- - In what ways are classes refin.pdf
 
-Select- Question 3 all of these choices are correct- Water dissolves.pdf
-Select- Question 3 all of these choices are correct- Water dissolves.pdf-Select- Question 3 all of these choices are correct- Water dissolves.pdf
-Select- Question 3 all of these choices are correct- Water dissolves.pdf
 
-One word answer- The original motivational theory - -Theory X and Y i.pdf
-One word answer- The original motivational theory - -Theory X and Y i.pdf-One word answer- The original motivational theory - -Theory X and Y i.pdf
-One word answer- The original motivational theory - -Theory X and Y i.pdf
 
-green dot Unanswered Open -green dot Unanswered Identify the structur.pdf
-green dot Unanswered Open -green dot Unanswered Identify the structur.pdf-green dot Unanswered Open -green dot Unanswered Identify the structur.pdf
-green dot Unanswered Open -green dot Unanswered Identify the structur.pdf
 
-One of the deepest unresolved paradoxes in evolutionary biology is th.pdf
-One of the deepest unresolved paradoxes in evolutionary biology is th.pdf-One of the deepest unresolved paradoxes in evolutionary biology is th.pdf
-One of the deepest unresolved paradoxes in evolutionary biology is th.pdf
 
-15 pts 7-5 pts each- A Starburst candy package contains 12 individual.pdf
-15 pts 7-5 pts each- A Starburst candy package contains 12 individual.pdf-15 pts 7-5 pts each- A Starburst candy package contains 12 individual.pdf
-15 pts 7-5 pts each- A Starburst candy package contains 12 individual.pdf
 
--NO COPY PAST PLEASE-- Critical National Information Infrastructure.pdf
--NO COPY PAST PLEASE--  Critical National Information Infrastructure.pdf--NO COPY PAST PLEASE--  Critical National Information Infrastructure.pdf
--NO COPY PAST PLEASE-- Critical National Information Infrastructure.pdf
 
--php include 'view-header-php'- -- -main- -nav- -h2-Administ.pdf
--php include 'view-header-php'- -- -main-     -nav-      -h2-Administ.pdf--php include 'view-header-php'- -- -main-     -nav-      -h2-Administ.pdf
--php include 'view-header-php'- -- -main- -nav- -h2-Administ.pdf
 
-- index-php --php include 'view-header-php'- -- -main- -nav-.pdf
-- index-php --php include 'view-header-php'- -- -main-     -nav-.pdf-- index-php --php include 'view-header-php'- -- -main-     -nav-.pdf
-- index-php --php include 'view-header-php'- -- -main- -nav-.pdf
 
- Exercise Seven 3 usages I github-dassroom-bot- public static String-.pdf
- Exercise Seven 3 usages I github-dassroom-bot- public static String-.pdf- Exercise Seven 3 usages I github-dassroom-bot- public static String-.pdf
- Exercise Seven 3 usages I github-dassroom-bot- public static String-.pdf
 
- A scientist is studying stem length in wheat plants- She crosses two.pdf
- A scientist is studying stem length in wheat plants- She crosses two.pdf- A scientist is studying stem length in wheat plants- She crosses two.pdf
- A scientist is studying stem length in wheat plants- She crosses two.pdf
 
(True or false) Phosphorylated CheB (CheB-P) passes on a phosphate to.pdf
(True or false) Phosphorylated CheB (CheB-P) passes on a phosphate to.pdf(True or false) Phosphorylated CheB (CheB-P) passes on a phosphate to.pdf
(True or false) Phosphorylated CheB (CheB-P) passes on a phosphate to.pdf
 
(Cilck on the icon in order to copy its contents into a spreadsheet-).pdf
(Cilck on the icon  in order to copy its contents into a spreadsheet-).pdf(Cilck on the icon  in order to copy its contents into a spreadsheet-).pdf
(Cilck on the icon in order to copy its contents into a spreadsheet-).pdf
 
(Click on the icon in order to copy its contents into a spreadsheet-).pdf
(Click on the icon in order to copy its contents into a spreadsheet-).pdf(Click on the icon in order to copy its contents into a spreadsheet-).pdf
(Click on the icon in order to copy its contents into a spreadsheet-).pdf
 
(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf
(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf
(Avial Skeleton) AssignmentFill the following blanks with a tem listed.pdf
 
(4) Millicent is a U-S- citizen who- until last year- had lived and wo.pdf
(4) Millicent is a U-S- citizen who- until last year- had lived and wo.pdf(4) Millicent is a U-S- citizen who- until last year- had lived and wo.pdf
(4) Millicent is a U-S- citizen who- until last year- had lived and wo.pdf
 
(5pts) 8- HSIPR Shipyards has $20-0 million in total invested operatin.pdf
(5pts) 8- HSIPR Shipyards has $20-0 million in total invested operatin.pdf(5pts) 8- HSIPR Shipyards has $20-0 million in total invested operatin.pdf
(5pts) 8- HSIPR Shipyards has $20-0 million in total invested operatin.pdf
 

Recently uploaded

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdf
Alexander Litvinenko
 

Recently uploaded (20)

Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.IPL Online Quiz by Pragya; Question Set.
IPL Online Quiz by Pragya; Question Set.
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
Chapter 7 Pharmacosy Traditional System of Medicine & Ayurvedic Preparations ...
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptx
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024Capitol Tech Univ Doctoral Presentation -May 2024
Capitol Tech Univ Doctoral Presentation -May 2024
 
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
Removal Strategy _ FEFO _ Working with Perishable Products in Odoo 17
 
Word Stress rules esl .pptx
Word Stress rules esl               .pptxWord Stress rules esl               .pptx
Word Stress rules esl .pptx
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING IIII BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
II BIOSENSOR PRINCIPLE APPLICATIONS AND WORKING II
 
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
BỘ LUYỆN NGHE TIẾNG ANH 8 GLOBAL SUCCESS CẢ NĂM (GỒM 12 UNITS, MỖI UNIT GỒM 3...
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
Basic Civil Engineering notes on Transportation Engineering, Modes of Transpo...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Poster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdfPoster_density_driven_with_fracture_MLMC.pdf
Poster_density_driven_with_fracture_MLMC.pdf
 

-12-13 (Count characters- words- and lines in a file) Write a program.pdf

  • 1. *12.13 (Count characters, words, and lines in a file) Write a program that will count the number of characters, words, and lines in a file. Words are separated by whitespace characters. The file name should be passed as a command-line argument, as shown in Figure 12.13. 490 Chapter 12 Exception Handling and Text I/O FiGuRE 12.13 The program displays the number of characters, words, and lines in the given file.