Question: Write two functions (sender and receiver) that communicate via external variables. Sender takes a message (a string) and saves it to the external variable secret.
Write two functions ("sender" and "receiver") that communicate via external variables. Sender takes a message (a string) and saves it to the external variable secret. The message is less that 100 characters long.
The receiver converts the secret to an integer and returns it.
Thus the two functions share information without explicitly passing it as parameters. (THIS IS IN C CODE (NOT C++))
GIVEN CODE:
#include
char secret[100];
void sender(char * message) {
}
int receiver(void) {
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
