Q463
How many times is the function recursive_reverse_string() called when the following code is executed? #include #include void recursive_reverse_string(char *s, int left, int right) if(left < right) char tmp = s[left]; s[left] = s[right]; s[right] = tmp; recursive_reverse_string(s, left+1, right-1); int main() char s[100] = "madam"; int len = strlen(s); recursive_reverse_string(s,0,len-1); printf("%s",s); return 0;
A.
3
AnswerB.
4
C.
5
D.
6
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board