Question: In C language Create your own functions with out using any String library [5 points] void capitalize (char s) Changes s so that the first
[5 points] void capitalize (char s) Changes s so that the first letter of every word is in upper case and each additional letter is in lower case. [5 points] int stremp_ign_ case (char 1, char s2) Compares s1 and s2 ignoring case. Retuns a positive number if s1 would appear after s2 in the dictionary, a negative number if it would appear before s2, or o if the two are equal. 13 points] void take last (char s, int n) Modifies s so that it consists of only its last n characters, if n s2 the length of s, the original string is unmodited. For example if we call take_last("Brubeck" 5), when the function finishes, the original string becomes "ubeck" 5 points] dedup (char s) retuns a new string based on s, but without any duplicate characters. For example, if s is the string. "There's always money in the banana stand. ", the function retums the string "Ther's alwymonitbd. ". It is up to the caller to free the memory allocated by the function. [5 points] pad (char s, int d returns a new string consisting of all of the letters of s, but padded with spaces at the end so that the total length of the retumed string is an even multiple of d. If the length of s is already an even multiple of d, the function retums a copy of s. The function returns NULL on failure or if s is NULL. Otherwise, it retuns the new string. It is up to the caller to free any memory allocated by the function. .[5 points] ends with ignore case (char s, char suEf) retums 1 if suff is a suffix of s ignoring case or 0 otherwise. [5 points] char repeat (char "s, int x, char sepl Retuns a new string consisting of the characters in s repeated x times, with the c rsep in between. For example, if s is the string all right, x is 3, and sep is, the function retums the new string all right, all right,all right. If s is NULL, the function retuns NULL, It is up to the caller to free any memory allocated by the function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
