Write a main program which prompts the user to enter a string and then calls the functions Engm- Scanf() and LettersCount(). The function EngmScanf() reads the string from the keyboard and saves it into a char array. NOTE: The string may or may not include spaces but ends when the enter key is pressed. Assume that the string will be no longer than 1000 characters. The function LettersCount() counts the number of characters in a string (ignoring spaces, commas, and periods) and returns the count back to the main, which then prints the count to the screen. For example, if the following input is typed in by the user: Intelligence plus character, that is the goal of true education. The output is: There are 53 letters in the string. Copy and paste your program into the box below. #include #define MXLEN 1000 /* Declare the functions here */ int main(void) { int number_of_lettersCount; char str[MXLEN]; printf("Enter a string: "); EngmScanf (str); number_of_lettersCount = lettersCount(str); printf("There are %d lettersCount in the string\n", number_of_lettersCount); return O; /* Implement the functions here */

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

in C program please

Question:
Write a main program which prompts the user to enter a string and then calls the functions Engm-
Scanf() and LettersCount(). The function EngmScanf() reads the string from the keyboard and saves
it into a char array.
NOTE: The string may or may not include spaces but ends when the enter key is pressed. Assume
that the string will be no longer than 1000 characters.
The function LettersCount() counts the number of characters in a string (ignoring spaces, commas,
and periods) and returns the count back to the main, which then prints the count to the screen.
For example, if the following input is typed in by the user:
Intelligence plus character, that is the goal of true education.
The output is:
There are 53 letters in the string.
Copy and paste your program into the box below.
#include <stdio.h>
#define MXLEN 1000
/* Declare the functions here */
int main(void)
{
int number_of_lettersCount;
char str[MXLEN];
printf("Enter a string: ");
EngmScanf (str);
number_of_lettersCount
lettersCount(str);
printf("There are %d lettersCount in the string\n", number_of_lettersCount);
return 0;
}
/* Implement the functions here */
Transcribed Image Text:Question: Write a main program which prompts the user to enter a string and then calls the functions Engm- Scanf() and LettersCount(). The function EngmScanf() reads the string from the keyboard and saves it into a char array. NOTE: The string may or may not include spaces but ends when the enter key is pressed. Assume that the string will be no longer than 1000 characters. The function LettersCount() counts the number of characters in a string (ignoring spaces, commas, and periods) and returns the count back to the main, which then prints the count to the screen. For example, if the following input is typed in by the user: Intelligence plus character, that is the goal of true education. The output is: There are 53 letters in the string. Copy and paste your program into the box below. #include <stdio.h> #define MXLEN 1000 /* Declare the functions here */ int main(void) { int number_of_lettersCount; char str[MXLEN]; printf("Enter a string: "); EngmScanf (str); number_of_lettersCount lettersCount(str); printf("There are %d lettersCount in the string\n", number_of_lettersCount); return 0; } /* Implement the functions here */
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY