Answered step by step
Verified Expert Solution
Question
1 Approved Answer
do exercise 2 plz Exercise 1 Write a C-program that asks for text input from the keyboard. The output of this program should be the
do exercise 2 plz
Exercise 1 Write a C-program that asks for text input from the keyboard. The output of this program should be the amount of characters, the amount of words and the amount of lines that have been typed. Multiple consecutive spaces should not be counted as multiple words. Reading keys from the keyboard is possible by using the function getchar(). The reading of characters from the keyboard can be stopped when the shutdown-code ^D (CTRL + D) is entered. ^D has the ASCII-value 4 (see 1.4 - Ctrl+D and Ctrl+Z issues (1.4)). Use a while loop. Exercise 2 Rewrite the C-program that was written for exercise 1, but use do while instead of whileStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started