Count Uppercase, Lowercase, special character and numeric values
Given a string, write a program to count the occurrence of Lowercase characters, Uppercase characters, Special characters and Numeric values.

Examples:

Input : #GeeKs01fOr@gEEks07
Output :
Upper case letters : 5
Lower case letters : 8
Numbers : 4
Special Characters : 2

Input : *GeEkS4GeEkS*
Output :
Upper case letters : 6
Lower case letters : 4
Numbers : 1
Special Characters : 2

Respuesta :

Answer:

View Image

Explanation:

  1. Import the #include <ctype.h> so that you can use the function to check the characters in the string.
  2. Create variable to store letter counts and user input.
  3. Ask for user input with scanf().
  4. Loop through the user input and check each character. Increase count accordingly.
  5. Print out final result.

Ver imagen GrandNecro
Ver imagen GrandNecro

Answer:

View Image

Explanation:

Import the #include <ctype.h> so that you can use the function to check the characters in the string.

Create variable to store letter counts and user input.

Ask for user input with scanf().

Loop through the user input and check each character. Increase count accordingly.

Print out final result.