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

3. (TCO 5) Write a function named processStrings that will havethree parameters;

ID: 3529196 • Letter: 3

Question

3.(TCO 5) Write a function named processStrings that will havethree parameters; two character arrays and an integer. The arguments to be passed to the function are shown below:

charstr1[] ="Hello";

charstr2[] =" World!";

intlength = 0;

The integer parameter will be passed by reference. The function will be a void function. The function will copy str1 into str2 and then calculate the length of str1 (the calculated length will be assigned to the length parameter). The function must use functions in the cstring library. Do not write a main function. Your function does not docinorcout.

Explanation / Answer

void processStrings(char str1[], char str2[],int &length){

strcpy (str2,str1);

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote