Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(C programming) What is the purpose of this program? #include <stdio.h> void mys

ID: 3703213 • Letter: #

Question

 (C programming) What is the purpose of this program? #include <stdio.h> void 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 != '') {         ++s1;     } /* end while */     for ( ;*s1 = *s2; s1++, s2++) {         ; /* empty statement */     } /* end for */ } /* end function mystery1 */

Explanation / Answer

Answer:

The purpose of the above code is that merging the two string into string1.