Question: Write a C language program which prompt user to input a sentence. You have to count the number of upper case letters, lower case letters,

Write a C language program which prompt user to input a sentence. You have to count the number of upper case letters, lower case letters, digits, white spaces and other characters in that string .

When you run the program, it should display following message:

"Please enter a sentence and then press ENTER:"

(if user enter the following string)

My name is Ali*

(Your program should print)

This string contain:

# of capital alphbets: 2

# os small alphabets: 9

# of white spaces: 3

# of Other chracter : 1

________________________________________

Instructions:

1) Use follwing four functions to find number of upper alphabets, lower alphabets, space and digits. any othet character will be count as other.

int islower(int c)

int isupper(int c)

int isdigit(int c)

int isspace(int c)

2) user getchar() function to read the characters as user input them.

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!