Question: This program is in C. I would appreciate your help. Write a function to shorten a string by three characters. If the initial length is

This program is in C. I would appreciate your help.
Write a function to shorten a string by three characters. If the initial length is less than three (not including the null terminator), make the length zero. HINT: If the initial length is less than three, make the character at index 0 a null character, otherwise overwrite the third-to-last character by a null character. You can assume string.h has been included so that you can use the function strlen(), void ShortenStringByTwo (char text[]) { Include the entire function in your answer (and only the function)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
