Question: Q5. [10] Morse code is an encoding scheme used in telecommunication to transmit text messages from one point to the other. The encoding scheme simply
![Q5. [10] Morse code is an encoding scheme used in telecommunication](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3c9fc84c8c_98866f3c9fc03c98.jpg)
Q5. [10] Morse code is an encoding scheme used in telecommunication to transmit text messages from one point to the other. The encoding scheme simply uses combinations of dots and dashes to represent alphabetic characters. We consider a fixed length code: each letter is represented by 5 symbols, as shown in the code table below. B -..." C-,--. M---- A IN--... O D---.. E.-.-.F..--, G---- Q -..-- R.-... S...-- T -.... H....- U.... V.... K-.-- L.--. W ---. X-..-. Y --- Z--..- ----- P ---- The code for space is ..... Write a C++ function that can takes in a message in the form of fixed-length Morse code and converts it to English text. You need to decide the input parameters of the function. Sample example: Input message: -... Output: THIS IS MESSAGE Note: this code table is one of the parameters to your function (you do not need to initialize it yourself). It is a 2-D array of the type: char table [27] [6], where row table[0] is a NULL-terminated character array of length 5 containing the code for A, table[1] containing code for B, and so on
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
