Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The language is C Conditions: You are not allowed to use the string library 'string.h' (the point of the exercise is for you to write

image text in transcribedimage text in transcribedThe language is C

Conditions: You are not allowed to use the string library 'string.h' (the point of the exercise is for you to write the functions that handle the strings). Your program will: - Declare a string in main(), the text in this string will be: "A string is just a bunch of chArs sitting togEthEr in Arow!" (without the quotes, of course) - Write a function called pidgin(.....) (you have to figure out the input parameters and return type) This function accepts an input string and swaps the order of each consecutive pair of characters. So, for example, if the input string contains "This is an example" then after calling the pidgin() function your string should contain "htsii snae axpmel" Your function will have to figure out what to do about the end of line delimiter. And we expect you to decide what is reasonable to do in the case where the length of the string is odd. Your 'pidgin()' function must not depend on the input string having a specific length (we can test it with different strings and it should work!). - Write a function called vowel_caser(...) (again, you have to figure out what the input parameters and return type should be). This function accepts an input string, and changes the case of each vowel (upper case vowels 'A,E,I,O,U' become lower case 'a,e,i,o,u' and vice-versa). For example, if the input string is "And Once There Was An Active Volcano On The Island" After calling 'vowel_caser()' the string should become "and once ThErE WAs an active VOLCANO on ThE islAnd" This is a good time for you to become familiar with a few useful library functions: 'isupper(); 'islower(); 'toupper(), and tolower(): These are defined in the header file 'ctype.h. There are many more useful functions in this library! keep it in mind should you need to do this sort of processing in the future. - Test both functions and make sure they work! Your main() function will: - Declare and initialize the string "A string is just a bunch of chArs sitting togEthEr in A row!" - Print the original string - Call the function pidgin() -Print the resulting string - Call vowel_caser() on the resulting string - Print the resulting string If all goes well, on the example string we gave you, your program will output exactly the text shown below (just the 3 lines of text - each in its own row)

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

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions

Question

Do not pay him, wait until I come

Answered: 1 week ago

Question

What steps should be taken to address any undesirable phenomena?

Answered: 1 week ago