Recursive Reverse string (Id-3470)
Write a recursive ‘C’ program to print the reverse of the string.
Note:
Function declaration for reversing string is given as precode, use that for defining the function and function call
Input Format
First line contains the string, S
Output Format
Print reverse of string, S
Sol:-
c-code:

#include<stdio.h>
#include<string.h>
int main(){
    char a[20];
    int i;
    scanf("%s",&a);
    void reverse(word,l){
        for(i=strlen(a)-1;i>=0;i--){printf("%c",a[i]);}}  
    reverse(a,1);}