SlideShare a Scribd company logo
Team Emertxe
Standard I/O
Assignment 1
Assignment 1
Assignment 1
WAP to count number of characters, words and lines
entered through stdin
Assignment 1
WAP to count number of characters, words and lines
entered through stdin
Input:
Assignment 1
WAP to count number of characters, words and lines
entered through stdin
Input: A string with Ctrl-D
Assignment 1
WAP to count number of characters, words and lines
entered through stdin
Input: A string with Ctrl-D
Output:
Assignment 1
WAP to count number of characters, words and lines
entered through stdin
Input: A string with Ctrl-D
Output: Print the character count, word count, and line
count.
Assignment 1
WAP to count number of characters, words and lines
entered through stdin
Input: A string with Ctrl-D
Output: Print the character count, word count, and line
count.
Note: Code should exactly work like wc command.
Assignment 1
Example’s:
Assignment 1
Example’s:
⮚Input: I am ok
⮚Output:
Character count: 8
Line count: 0
Word count: 3
Assignment 1
Example’s:
⮚Input: I_am_okn
Assignment 1
Example’s:
⮚I_am_okn Character count: 1
Word count: 0
Line count: 0
Assignment 1
Example’s:
⮚I_am_okn Character count: 2
Word count: 1
Line count: 0
Assignment 1
Example’s:
⮚I_am_okn Character count: 3
Word count: 1
Line count: 0
Assignment 1
Example’s:
⮚I_am_okn Character count: 4
Word count: 1
Line count: 0
Assignment 1
Example’s:
⮚I_am_okn Character count: 5
Word count: 2
Line count: 0
Assignment 1
Example’s:
⮚I_am_okn Character count: 6
Word count: 2
Line count: 0
Assignment 1
Example’s:
⮚I_am_okn Character count: 7
Word count: 2
Line count: 0
Assignment 1
Example’s:
⮚I_am_okn Character count: 8
Word count: 3
Line count: 1
Assignment 1
Example’s:
⮚Input: I am
Ok
 Output:
Character count: 8
Line count: 0
Word count: 3
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 1
Word count: 0
Line count: 0
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 2
Word count: 1
Line count: 0
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 3
Word count: 1
Line count: 0
Check current character and
previous character, if both are
space(‘ ’) or ‘t’ or ‘n’, then
don’t increment word count.
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 4
Word count: 1
Line count: 0
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 5
Word count: 1
Line count: 0
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 6
Word count: 2
Line count: 1
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 7
Word count: 2
Line count: 2
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 8
Word count: 2
Line count: 3
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 9
Word count: 2
Line count: 3
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 10
Word count: 2
Line count: 3
Assignment 1
Example’s:
⮚I_ _amn
⮚n
⮚n
⮚Okn
Character count: 11
Word count: 3
Line count: 4
Assignment 1
Sample execution:-
Assignment 1
Sample execution:-
Assignment 1
Sample execution:-
Assignment 1
Pre-requisites:-
Assignment 1
Pre-requisites:-
⮚Non formatted function like getchar()
Assignment 1
Pre-requisites:-
⮚Non formatted function like getchar()
Objective:-
Assignment 1
Pre-requisites:-
⮚Non formatted function like getchar()
Objective:-
⮚To understand the concept of Standard input & output.
Team Emertxe
Thank you

More Related Content

PDF
07-Strings( string Functions and parameters C).pdf
PPTX
C - String ppt
PPTX
STRINGS_IN_PYTHON 9-12 (1).pptx
DOCX
For this assignment, download the A6 code pack. This zip fil.docx
PPTX
String in programming language in c or c++
PPTX
Data Types and Variables In C Programming
PPTX
An Introduction To Python - Processing Strings
07-Strings( string Functions and parameters C).pdf
C - String ppt
STRINGS_IN_PYTHON 9-12 (1).pptx
For this assignment, download the A6 code pack. This zip fil.docx
String in programming language in c or c++
Data Types and Variables In C Programming
An Introduction To Python - Processing Strings

More from Emertxe Information Technologies Pvt Ltd (20)

Ad

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
master seminar digital applications in india
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Institutional Correction lecture only . . .
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Classroom Observation Tools for Teachers
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Anesthesia in Laparoscopic Surgery in India
Institutional Correction lecture only . . .
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
102 student loan defaulters named and shamed – Is someone you know on the list?
Classroom Observation Tools for Teachers
Pharmacology of Heart Failure /Pharmacotherapy of CHF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O7-L3 Supply Chain Operations - ICLT Program
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
TR - Agricultural Crops Production NC III.pdf
Ad

01_wordcount.pdf