string_reverse.c 482 Bytes
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

char *string_reverse(char *s) {
    // Implement this!
    // Use strlen to allocate enough memory for the string, including the 
    // null-terminator.

    // Set the null-terminator byte.

    // Write a for loop to reverse the string. You can index into the
    // string just like an array to get the characters of s as well as
    // set the characters in the reversed string.

    // Return the reversed string.
}