Write a program that takes in a string from the user. Implement the following op
ID: 3531591 • Letter: W
Question
Write a program that takes in a string from the user. Implement the following options as command-line arguments: (a) -rp <substr1> <substr2> replace any occurrences of <substr1> with <substr2>, e.g.,: -rp abc cba will replace all occurrences of "abc" with "cba" in input string. (b) -rm <substr> remove all occurrences of <substr> in input string, e.g.,: -rm abc will remove all occurrences of "abc" in input string. (c) -rmw <substr> remove any words containing <substr> in input string, e.g.,: -rmw abc will remove all words that have "abc" in them. (d) -sw swap all apostrophes with commas in input string. (e) -an identify and print pairs of words in input string that are anagrams.
Explanation / Answer
techylib.com/en/view/laborermaize/build_custom_classes
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.