Question
Write a program in C that can translate International (ITU) Morse code to text and vice versa. Requirements: 1) Input that is a combination of
Write a program in C that can translate International (ITU) Morse code to text and vice versa.
Requirements:
1) Input that is a combination of alphanumeric characters and white-space is to be translated into Morse code.
2) Input that is a combination of periods (.), dashes (-), slashes (/) and whitespace is to be translated into text.
3) Incorrectly formatted input is to result in the message Invalid input! and the program is to return a non-zero return value.
4) Incorrect Morse code input is to result in the message Invalid Morse code! and the program is to return a non-zero return value.
5) Alphanumeric output is to be single-spaced and ALL CAPS.
6) Morse code output is to be single-spaced between letter groups, and space-separated slash delimited between words.
Please write the code with as much detail as possible, with comments explaining major steps.
Upon running the program, the user must be presented with the following prompt Text Welcome to the Morse translator. Enter inputStep 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