Question
How do I write a C function that outputs an arbitrary string by switching a variable between 2 and 1 ( in this case we
How do I write a C function that outputs an arbitrary string by switching a variable between 2 and 1 ( in this case we would be outputting in MORSE code, but don't mind with that, imagine you re making the right 2 to 1 and vice versa assignments of the "control variable". The method you choose must output any standard null-terminated string containing characters A-Z or 0-9 in Morse code, by switching the "control variable" between 2 and 1. For the demo, a child function, called from main( ) should output the string in Morse code, using a method that will work for any arbitrary string constant (in other words, main should pass the address of the null-terminated ASCII string to the child function)
Step 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