2

Recursive reverse (Id-1250)

Just for Practice 1 Additional [3-Jan-2018 to 10-Apr-2018]

Program ID- 1250

Given a string, write a recursive routine to reverse it. For example, given the string ‘and, the reversal of the string is ‘dna’.

Input Format

A string

Output Format

Reverse of the string

 

Code

Please Comment Working if the code worked to you

If you have other working codes please comment the codes enclosing with <pre> and </pre> 🙂

Example: <pre> Your Code </pre>

C Code [By Chir Patel]

The Above Codes are for reference only. It doesn't mean everyone to directly copy/paste those codes.

 

Click Here to Leave a Comment Below 2 comments
abhinav - January 6, 2018




4



2

Reply
nishant - March 31, 2018

getting the following error

/tmp/tmp1cKcG1/Hello.cpp: In function ‘int main()’:
/tmp/tmp1cKcG1/Hello.cpp:7:20: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[10]’ [-Wformat=]
scanf(“%s”,&str);
^




0



0

Reply

Leave a Reply:

This site uses cookies and by using the site you are consenting to this.