Coders Packet

Encoding and Decoding of Morse Code using C++

By Sheshagiri Kulkarni

This Program converts English to Morse code (Encode) and Morse code back to English (Decode) using C++

This Program takes a string as input and produces corresponding output based on the operation

basically, 2 user-defined functions are declared in order to encode and decode the input

Decoding process :

1.string is taken as input (Morse Code)

2.Input is passed along with a constant string array which has pre-defined values of morse code for the corresponding English alphabets

3.user-defined decode function compares string value and returns corresponding morse output to the called function in main()

Encoding Process :

1.Character is taken as input and passed to a user-defined function that has a single character parameter 

2.function finds a character in the predefined text and returns the index at which it has compared results

3.index is used to return corresponding output from constant string array of morse codes


Download Complete Code


No comments yet