Question: f . Write a C program that removes characters in a string except alphabets ( Assume English alphabet is used: a - z and A

f. Write a C program that removes characters in a string except alphabets (Assume
English alphabet is used: a-z and A-Z). You cannot use string.h library for this exercise.
A sample run would be as follows:
Please enter your string: hello-/world
Helloworld
Your program needs to have the following functions:
is_alphabet () : This function will take a character and returns true if it is an
English alphabet character (a-z or A-Z) and returns false if it is not. You need to
decide about the input. Add comment for his function and explain the input
and output.
clean_string(): This function will remove the characters that are not
alphabet characters in a given string. You need to decide about the input
and return here. Add comment for his function and explain the input and
output.
You need to ask user to enter a string in the main and then make use of
clean_string() function which makes use of is_alphabet() to clean the string.
You will then display the cleaned string in the main.
 f. Write a C program that removes characters in a string

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!