Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analytics Systems Engineering Cybersecurity Project Management

Authors: Christopher Greco

1st Edition

168392648X, 978-1683926481

More Books

Students also viewed these Databases questions

Question

Does the definition adequately differentiate the item? (410)

Answered: 1 week ago

Question

Which business cannot ever generate QBI

Answered: 1 week ago