Menu

[Solved]Done C Unsure Structs Know Supposed Use Arrays Q37219912

This should be done in C. Unsure how to do this with structs. Iknow we are supposed to use arrays.

Problem 1. String Statistics (30 points) Text processing software like Microsoft Word often provides statistics about the tex

Problem 1. String Statistics (30 points) Text processing software like Microsoft Word often provides statistics about the text. Example of such statistics are number of characters, number of spaces etc. Write a program that calculates such statistics for a given string of maximum size 50. Your code must be able to take whitespaces as input. You need to keep track and output: Number of Vowels Number of Consonants * Number of Digits . Number of Uppercase Characters Number of Lowercase Characters Number of Special Characters Number of Spaces * * Include string.h, stdlib.h and ctype.h. Typically, in the future you will use functions created from others, which are saved in a library. This question is for you to practice how to find the function that you need and how to use it. Sample Input and Output: (Your code should print the red texts on the screen) Sam Sample Enter Text: BTHO Programming Assignment-5!! Vowel: 7 Consonant: 18 Digit: 1 Lowercase: 19 Special: 3 Space: 2 Vowel: 2 Consonant: 3 Digit: 0 Enter Text: Gig’em! Special: 2 . Use a struct “stats” that contains all of the stats that you need to keep track (vowel, . Write a function isVowel) that takes a char and returns if it is a vowel or not. You can . Use functions from the library ctype.h to get information from a character (if it is a consonant, digit, .). reuse the function from a previous homework. letter, a digit,…). DO NOT use numbers from the ASCII table to compare the characters, use characters (e.g. c ‘a, and c >’a’). *If you don’t use the functions specified from those libraries and the struct mentioned you won’t get the maximum grade. Show transcribed image text Problem 1. String Statistics (30 points) Text processing software like Microsoft Word often provides statistics about the text. Example of such statistics are number of characters, number of spaces etc. Write a program that calculates such statistics for a given string of maximum size 50. Your code must be able to take whitespaces as input. You need to keep track and output: Number of Vowels Number of Consonants * Number of Digits . Number of Uppercase Characters Number of Lowercase Characters Number of Special Characters Number of Spaces * * Include string.h, stdlib.h and ctype.h. Typically, in the future you will use functions created from others, which are saved in a library. This question is for you to practice how to find the function that you need and how to use it. Sample Input and Output: (Your code should print the red texts on the screen) Sam Sample Enter Text: BTHO Programming Assignment-5!! Vowel: 7 Consonant: 18 Digit: 1 Lowercase: 19 Special: 3 Space: 2 Vowel: 2 Consonant: 3 Digit: 0 Enter Text: Gig’em! Special: 2 . Use a struct “stats” that contains all of the stats that you need to keep track (vowel, . Write a function isVowel) that takes a char and returns if it is a vowel or not. You can . Use functions from the library ctype.h to get information from a character (if it is a consonant, digit, .). reuse the function from a previous homework. letter, a digit,…). DO NOT use numbers from the ASCII table to compare the characters, use characters (e.g. c ‘a, and c >’a’). *If you don’t use the functions specified from those libraries and the struct mentioned you won’t get the maximum grade.

Expert Answer


Answer to This should be done in C. Unsure how to do this with structs. I know we are supposed to use arrays…. . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *