SlideShare a Scribd company logo
Write a program that counts the number of characters and lines in the input. Sample output
Note: The newline character counts as a character. You'll need to press CTRL-D to send an (end
of file) to indicate the end of your input. Hint: Use getchar () to process on character at a time.
Look for ' In' characters, and count them to determine the number of lines in the input. See
Figure 4.13 of PPSAA or for an example on reading characters in a loop.

More Related Content

More from santosha5446

Which of the following circumstances may lead to concern when analyzi.pdf
 Which of the following circumstances may lead to concern when analyzi.pdf Which of the following circumstances may lead to concern when analyzi.pdf
Which of the following circumstances may lead to concern when analyzi.pdf
santosha5446
 
Which of the following is a motvation for visiting Culture Heritage V.pdf
 Which of the following is a motvation for visiting Culture Heritage V.pdf Which of the following is a motvation for visiting Culture Heritage V.pdf
Which of the following is a motvation for visiting Culture Heritage V.pdf
santosha5446
 
Your Block class should exhibit the following features. Public child .pdf
 Your Block class should exhibit the following features. Public child .pdf Your Block class should exhibit the following features. Public child .pdf
Your Block class should exhibit the following features. Public child .pdf
santosha5446
 
Your are assigned to dentify the self-actualization need in UDEMY w.pdf
 Your are assigned to dentify the self-actualization need in UDEMY w.pdf Your are assigned to dentify the self-actualization need in UDEMY w.pdf
Your are assigned to dentify the self-actualization need in UDEMY w.pdf
santosha5446
 
You are to address the questions in each of the following problems. 1.pdf
 You are to address the questions in each of the following problems. 1.pdf You are to address the questions in each of the following problems. 1.pdf
You are to address the questions in each of the following problems. 1.pdf
santosha5446
 
Which of the following is FALSE about RBC contain a dimer of spectri.pdf
 Which of the following is FALSE about RBC contain a dimer of spectri.pdf Which of the following is FALSE about RBC contain a dimer of spectri.pdf
Which of the following is FALSE about RBC contain a dimer of spectri.pdf
santosha5446
 
Yoo hove learned obout the various straceyies thint companies underta.pdf
 Yoo hove learned obout the various straceyies thint companies underta.pdf Yoo hove learned obout the various straceyies thint companies underta.pdf
Yoo hove learned obout the various straceyies thint companies underta.pdf
santosha5446
 
Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf
 Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf
Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf
santosha5446
 
Which of the following are potential medical consequences that can re.pdf
 Which of the following are potential medical consequences that can re.pdf Which of the following are potential medical consequences that can re.pdf
Which of the following are potential medical consequences that can re.pdf
santosha5446
 
Write a short response explaining in detail steps to compute for endi.pdf
 Write a short response explaining in detail steps to compute for endi.pdf Write a short response explaining in detail steps to compute for endi.pdf
Write a short response explaining in detail steps to compute for endi.pdf
santosha5446
 
Write a Matlab function f which takes a quadratic matrix A and a scal.pdf
 Write a Matlab function f which takes a quadratic matrix A and a scal.pdf Write a Matlab function f which takes a quadratic matrix A and a scal.pdf
Write a Matlab function f which takes a quadratic matrix A and a scal.pdf
santosha5446
 
Which of the following are likely to directly promote mRNA degradatio.pdf
 Which of the following are likely to directly promote mRNA degradatio.pdf Which of the following are likely to directly promote mRNA degradatio.pdf
Which of the following are likely to directly promote mRNA degradatio.pdf
santosha5446
 
Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf
 Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf
Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf
santosha5446
 
Which of the following accounts for the fluid aspect of the fluid mos.pdf
 Which of the following accounts for the fluid aspect of the fluid mos.pdf Which of the following accounts for the fluid aspect of the fluid mos.pdf
Which of the following accounts for the fluid aspect of the fluid mos.pdf
santosha5446
 
Which of the below statements is correct for P3 The packet is delete.pdf
 Which of the below statements is correct for P3 The packet is delete.pdf Which of the below statements is correct for P3 The packet is delete.pdf
Which of the below statements is correct for P3 The packet is delete.pdf
santosha5446
 
Which of the following are advantages of participative budgeting Sel.pdf
 Which of the following are advantages of participative budgeting Sel.pdf Which of the following are advantages of participative budgeting Sel.pdf
Which of the following are advantages of participative budgeting Sel.pdf
santosha5446
 

More from santosha5446 (16)

Which of the following circumstances may lead to concern when analyzi.pdf
 Which of the following circumstances may lead to concern when analyzi.pdf Which of the following circumstances may lead to concern when analyzi.pdf
Which of the following circumstances may lead to concern when analyzi.pdf
 
Which of the following is a motvation for visiting Culture Heritage V.pdf
 Which of the following is a motvation for visiting Culture Heritage V.pdf Which of the following is a motvation for visiting Culture Heritage V.pdf
Which of the following is a motvation for visiting Culture Heritage V.pdf
 
Your Block class should exhibit the following features. Public child .pdf
 Your Block class should exhibit the following features. Public child .pdf Your Block class should exhibit the following features. Public child .pdf
Your Block class should exhibit the following features. Public child .pdf
 
Your are assigned to dentify the self-actualization need in UDEMY w.pdf
 Your are assigned to dentify the self-actualization need in UDEMY w.pdf Your are assigned to dentify the self-actualization need in UDEMY w.pdf
Your are assigned to dentify the self-actualization need in UDEMY w.pdf
 
You are to address the questions in each of the following problems. 1.pdf
 You are to address the questions in each of the following problems. 1.pdf You are to address the questions in each of the following problems. 1.pdf
You are to address the questions in each of the following problems. 1.pdf
 
Which of the following is FALSE about RBC contain a dimer of spectri.pdf
 Which of the following is FALSE about RBC contain a dimer of spectri.pdf Which of the following is FALSE about RBC contain a dimer of spectri.pdf
Which of the following is FALSE about RBC contain a dimer of spectri.pdf
 
Yoo hove learned obout the various straceyies thint companies underta.pdf
 Yoo hove learned obout the various straceyies thint companies underta.pdf Yoo hove learned obout the various straceyies thint companies underta.pdf
Yoo hove learned obout the various straceyies thint companies underta.pdf
 
Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf
 Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf
Xavier and his wife Maria have total W-2 income of $96,002. They will.pdf
 
Which of the following are potential medical consequences that can re.pdf
 Which of the following are potential medical consequences that can re.pdf Which of the following are potential medical consequences that can re.pdf
Which of the following are potential medical consequences that can re.pdf
 
Write a short response explaining in detail steps to compute for endi.pdf
 Write a short response explaining in detail steps to compute for endi.pdf Write a short response explaining in detail steps to compute for endi.pdf
Write a short response explaining in detail steps to compute for endi.pdf
 
Write a Matlab function f which takes a quadratic matrix A and a scal.pdf
 Write a Matlab function f which takes a quadratic matrix A and a scal.pdf Write a Matlab function f which takes a quadratic matrix A and a scal.pdf
Write a Matlab function f which takes a quadratic matrix A and a scal.pdf
 
Which of the following are likely to directly promote mRNA degradatio.pdf
 Which of the following are likely to directly promote mRNA degradatio.pdf Which of the following are likely to directly promote mRNA degradatio.pdf
Which of the following are likely to directly promote mRNA degradatio.pdf
 
Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf
 Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf
Word� balatn. Exp19_Word_Intro_Cap_Thinking.docx adl dosyay indiri.pdf
 
Which of the following accounts for the fluid aspect of the fluid mos.pdf
 Which of the following accounts for the fluid aspect of the fluid mos.pdf Which of the following accounts for the fluid aspect of the fluid mos.pdf
Which of the following accounts for the fluid aspect of the fluid mos.pdf
 
Which of the below statements is correct for P3 The packet is delete.pdf
 Which of the below statements is correct for P3 The packet is delete.pdf Which of the below statements is correct for P3 The packet is delete.pdf
Which of the below statements is correct for P3 The packet is delete.pdf
 
Which of the following are advantages of participative budgeting Sel.pdf
 Which of the following are advantages of participative budgeting Sel.pdf Which of the following are advantages of participative budgeting Sel.pdf
Which of the following are advantages of participative budgeting Sel.pdf
 

Recently uploaded

NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 

Recently uploaded (20)

NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 

Write a program that counts the number of characters and lines in the.pdf

  • 1. Write a program that counts the number of characters and lines in the input. Sample output Note: The newline character counts as a character. You'll need to press CTRL-D to send an (end of file) to indicate the end of your input. Hint: Use getchar () to process on character at a time. Look for ' In' characters, and count them to determine the number of lines in the input. See Figure 4.13 of PPSAA or for an example on reading characters in a loop.