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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!