Question
Write a C function called str_clean that takes in a string and modifies it, so that it removes all of the characters at the beginning
Write a C function called str_clean that takes in a string and modifies it, so that it removes all of the characters at the beginning and the end of the string that are not visible (i.e., whitespaces and control characters).
For example, the string " hello " will be trimmed down to the string "hello".
Additionally, write a complete C program that shows the correct functionality of this function, by trying it with the following input: " , XXXX429. ", where XXXX is a placeholder for the last 4 digits of your student ID number. Print the expected result when running your C program with the required input, both before and after calling the str_clean function.
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