Answered step by step
Verified Expert Solution
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
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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started