Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given a C String, write a function removeNonAlpha that removes all non-alphabet chars in the C String. When removing a non-alphabet char, you should shift
Given a C String, write a function removeNonAlpha that removes all non-alphabet chars in the C String. When removing a non-alphabet char, you should shift all following chars one position to the left. Dont forget to shift the null byte as well!
char cstr[] = "S5mal.lb-erg! Is+ C$s Senpai$$$"; removeNonAlpha(cstr); for (int i = 0; cstr[i] != '\0'; i++) cout << cstr[i];
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started