Question: C language and skeleton code provided below: 1. Write a function void camelCase(char* word) where word consists of more than two words separated by underscore

C language and skeleton code provided below:

1. Write a function void camelCase(char* word) where word consists of more than two words separated by underscore such as random_word or "this_is_my_first_programming_assignment". camelCase() should remove underscores from the sentence and rewrite in lower camel case (https:// en.wikipedia.org/wiki/Camel_case). Watch out for the end of the string, which is denoted by \0. You have to ensure that legal strings are given to the camelCase() function. NOTE: You can use the toUpperCase(...) a function provided in the skeletal code to change the case of a character from lowercase to upper case . Notice that toUpperCase() assumes that the character is currently in lower case. Therefore, you would have to check the case of a character before calling toUpperCase().

skeleton:

#include #include

/*converts ch to upper case, assuming it is in lower case currently*/ char toUpperCase(char ch){ return ch-'a'+'A'; }

void camelCase(char* word){ /*Convert to camelCase*/ }

int main(){ /*Read the string from the keyboard */ /*Call camelCase*/ /*Print the new the string */ return 0; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!