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 exercise stringAlteration that takes a part place as an topic, sculptures it end to front and produce nonentity.The exercise should plug processing and requite when the terminating inoperative charcter of the string is encountered. Need comments to comprehend what is going on.

    Expert Tally

     

    // header file
    # conceive <stdio.h>
    /* This is the recursive exercise flatter to sculpture the alteration string */
    void stringReverse(char *objCharArry)
    {
    if (*objCharArry)
    {
    stringReverse(objCharArry+1); // Recursive flatter
    printf(“%c”, *objCharArry);
    }
    }
    /*Ocean regularity avowal announcement*/
    int ocean()
    {
    char objCharArry[] = “This String Alteration Test”;
    stringReverse(objCharArry);
    requite 0;
    }
    Output Screnshot: