C Program to reverse string using do while

Program

#include <stdio.h>
#define MAX_SIZE 100 
int main()
{
    char inputString[MAX_SIZE], reverseString[MAX_SIZE];
    int strIndex, revIndex, length;
    length = 0;
    printf("Enter any string: ");
    scanf("%s", inputString);
    while(inputString[length] != '\0')
    {
         length++;
    }   
    revIndex = 0;
    strIndex = length - 1;
    do {
        reverseString[revIndex] = inputString[strIndex];
        strIndex--;
        revIndex++;
    }while(strIndex >= 0);
    reverseString[revIndex] = '\0';
    printf("Original string: %s\n", inputString);
    printf("Reverse string: %s\n", reverseString);
    return 0;
}

Output

$ gcc reverse-string-using-do-while.c 
$ ./a.out
Enter any string: computer
Original string: computer
Reverse string: retupmoc