Task 1: String Extraction Write a program that reads in a string and an integer value n and then extracts last n charact

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Task 1: String Extraction Write a program that reads in a string and an integer value n and then extracts last n charact

Post by answerhappygod »

Task 1 String Extraction Write A Program That Reads In A String And An Integer Value N And Then Extracts Last N Charact 1
Task 1 String Extraction Write A Program That Reads In A String And An Integer Value N And Then Extracts Last N Charact 1 (156.17 KiB) Viewed 10 times
Task 1: String Extraction Write a program that reads in a string and an integer value n and then extracts last n characters from the input string to a new string (you MUST create a new string). You should have at least one function in your program other than the main function. Sample Interaction: Enter a string: YouAreCrazy Enter an integer: 5 Extracted string: Crazy Task 2: Louder! Write a program that reads a word from the user and modify the string so that all the vowels are changed to upper-case letters and leave the consonants as the user entered them. You should have at least one function in your program other than the main function. Sample Interaction: Enter a word: Bingo! Changed word: BIng0! Task 3: Signature Generation Write a program that asks the user for: • Person Name (Max 100 characters) • Work Position (Maximum 100 characters) • Work Organization (Maximum 100 characters) On the basis of these values, create a signature C-string (single string). Your program should concatenate all the fields together into one C-string and print out that string. Use strncat for this task. Your program should have at least one more function other than the main function. Sample Interaction: Enter Name: John Mason Enter Position: Senior Vice President Enter Organization: SoftSystems LLC The signature is: John Mason, Senior Vice President, SoftSystems LLC. Task 4: Comma Removal Write a program that accepts a C-string (maximum 100 characters) consisting of three numbers (double) separated by commas from the user, and separates out all three numbers stripping off commas from it. Your program should have at least one more function other than the main function. Sample Interaction: Enter three numbers (a, b, c): 100.11, 200.22, 300.33 Extracted numbers: a = 100.11 b = 200.22 C = 300.33
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply