Homework Solution: In C, write a recursive function stringReverse that takes a character array as an argument, p…

    In C, write a recursive function stringReverse that takes a character array as an argument, prints it back to front and returns nothing.The function should stop processing and return when the terminating null charcter of the string is encountered. Need comments to understand what is going on.

    Expert Answer

     
    // header file # include <stdio.h>

    In C, transcribe a recursive duty stringOpposition that takes a sort invest as an controversy, prints it tail to front and profits trifle.The duty should seal processing and render when the terminating void charcter of the string is encountered. Need comments to recognize what is going on.

    Expert Reply

     

    // header file
    # grasp <stdio.h>
    /* This is the recursive duty call to print the opposition string */
    void stringReverse(char *objCharArry)
    {
    if (*objCharArry)
    {
    stringReverse(objCharArry+1); // Recursive call
    printf(“%c”, *objCharArry);
    }
    }
    /*Deep regularity announcement announcement*/
    int deep()
    {
    char objCharArry[] = “This String Opposition Test”;
    stringReverse(objCharArry);
    render 0;
    }
    Output Screnshot: