Question: Consider the following recursive function: Line 1 . void myfun ( string word ) Line 2 . { Line 3 . if ( word .
Consider the following recursive function:
Line void myfunstring word
Line
Line if wordlength return;
Line myfunwordsubstr word.length;
Line cout word;
Line
What changes about this function if lines and are swapped?
Question options:
nothing
creates infinite recursion
prints the characters of the string in both forward and reverse order
reverses the order in which the characters of the string are printed
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
