[Solved]Given String Write Recursive Function Reverses String Input Format String Constraints X Ou Q37131009
Given a string, Write recursive function that reverses thestring.
Input Format
A String.
Constraints
x
Output Format
Reverse of Strings.
Sample Input
Being
Sample Output
gnieB
void reverseRecursively(char* s, int i, int j)
{
//code your logic here.
}
int main() {
char str[1000];
// To Read, Space Separated String
fgets(str, 1000, stdin);
// Remove ‘n’ from String
int len = strlen(str);
if(str[len-1]==’n’){
str[len-1]=”;
len–;
}
reverseRecursively(str, 0, len-1);
printf(“%s”, str);
return 0;
}
must be in java
Expert Answer
Answer to Given a string, Write recursive function that reverses the string. Input Format A String. Constraints x Output Format Re… . . .
OR

