Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

What is focal length? Explain with a diagram and give an example.

Answered: 1 week ago

Question

What is physics and how does it apply in daily life?

Answered: 1 week ago

Question

3 The distinction between microeconomics and macroeconomics.

Answered: 1 week ago