Course Solutions Uncategorized (Solved) : Given String Write Recursive Function Reverses String Input Format String Constraints X Ou Q37131009 . . . .

(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


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Chegg Study Home Study Engineering Computer Science Software Design Software Design Soluti Q26268245 . . . .(Solved) : Chegg Study Home Study Engineering Computer Science Software Design Software Design Soluti Q26268245 . . . .

<br/><img src="https://media.cheggcdn.com/media%2F9b0%2F9b09bf39-4fd0-4aaf-af76-4fd158d75075%2Fimage" alt="Chegg Study home / study /engineering /computer science / software design/software design solutions manuals / an introduction to An Introduction to Programming Using Visual B TEXTBOOK SOLUTIONS EXPERT