Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(C programming) What is the purpose of this program? #include void mystery1 (char *, const char *); /* prototype */ int main(void) { char string1[80],
(C programming) What is the purpose of this program? #includevoid mystery1 (char *, const char *); /* prototype */ int main(void) { char string1[80], string2[80]; /* create char array */ printf ("Enter two strings : "); scanf ("%s%s", string1, string2); mystery1 (string1, string2); printf ("%s ", string1); return 0; /* indicates successful termination */ } /* What does this function do? */ void mystery1 (char *s1, const char *s2) { while (*s1 != '\0') { ++s1; } /* end while */ for ( ;*s1 = *s2; s1++, s2++) { ; /* empty statement */ } /* end for */ } /* end function mystery1 */
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