Question: PLEASE READ THE ENTIRE PROMPT FIRST! Solution must be written in C. Write a function void camelCase(char* word) where the argument of the function is

PLEASE READ THE ENTIRE PROMPT FIRST! Solution must be written in C.

Write a function void camelCase(char* word) where the argument of the function is a string that must consist of two or more words separated by one or more underscores such as random_word or "this_is_my_first_programming_assignment". camelCase(..) should remove underscores from the sentence and rewrite it in "lower camel case (A naming convention of the CamelCase family in which several words are joined together, where the first letter of the entire word is lowercase, but subsequent first letters are uppercase)" (https://en.wikipedia.org/wiki/Camel_case).Watch out for the end of the string, which is denoted by \0. You also have to make sure that an user provided input string is in valid form first before you use it for the function camelCase(..). Below are some examples of the conversions that are expected - a) "_random_ _word" should be changed to "random_word" first. b) "@$random4word" should be changed to "random_word" first. c) " random word " should be changed to "random_word" first. d) "random word" should be changed to "random_word" first. e) "RANDOM_Word" should be changed to "random_word" first. f) One or more combinations from options a, b, c, d and e. The strings that you must not allow as arguments are - "_", "__ _", " ", "435_%7_$$", "random", "_random_". Print invalid input string for such cases. You are allowed to limit the size of the input string you will provide. Finally, do not use the library functions isupper(..), islower(..) or strlen(..). Write the functions on your own to perform such operations..

Skeleton code:

/* CS261- Assignment 1 - Q.3*/

/* Name:

* Date:

* Solution description:

*/

#include

#include

char toUpperCase(char ch){

/*Convert ch to upper case, assuming it is in lower case currently*/

}

char toLowerCase(char ch){

/*Convert ch to lower case, assuming it is in upper case currently*/

}

int stringLength(char s[]) {

/*Return the length of the string*/

}

void camelCase(char* word){

/*Convert to camelCase*/

}

int main(){

/*Read the string from the keyboard*/

/*Call camelCase*/

/*Print the new 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!