Question: Using a sentence or two, explain what the below user - defined function is trying to accomplish. Assuming that the code is error free, give

Using a sentence or two, explain what the below user-defined function is trying to accomplish. Assuming that the code is error free, give the output of the two puts(). Run through your code for 5 iterations of the while loop. int main ( void ){ char string1[100]=" NORTHDAKOTASTATEUNIVERSITY "; char string2[100]; void mystery ( char * s1, char * s2); mystery (& string1[0], & string2[0]); puts ( string1); puts ( string2); } void mystery ( char * s1, char * s2){ while (* s1!='\0'){* s2=* s1 ; s1++; s2++; * s2=''; // space s2++; }* s2='\0'; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!