Question: PLZ GIVE SAME OUTPUT ...C PRG 1 - WAP to count no. of characters, words and lines, entered through stdin Description: Read characters from user
PLZ GIVE SAME OUTPUT ...C PRG
1 - WAP to count no. of characters, words and lines, entered through stdin
Description:
Read characters from user till EOF
If EOF received, print the character count, word count, and line count.
Code should exactly work like wc command.
Pr-requisites:-
Non formated function like getchar()
Objective: -
To understand the concept of
Standard input & output
Inputs: -
A string with Ctrl-D
Sample execution: - Test Case 1: user@emertxe] ./my_wc Hello world Dennis Ritchie Linux Character count : 33 Line count : 3 Word count : 5 Test Case 2: Hello world Dennis Ritchie Linux Character count : 39 Line count : 3 Word count : 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
