C Example: Morse Code Codec: letter/digit table and word separators
A complete Morse codec: a 36-entry table maps letters and digits to dots and dashes, words are separated by /; the decoder splits tokens on spaces and restores word breaks at /, then verifies SOS C 2026 round-trips. Shows table lookup, case folding and token parsing.
🖥 Run OnlineGCC 10.2 · C11 standard · click ▶ to run · Copy code
🖨 Reference OutputMatches the online run in a standard C11 environment
text : SOS C 2026 morse : ... --- ... / -.-. / ..--- ----- ..--- -.... decoded : SOS C 2026 match : OK
🧩 Keep Learning