View Code of Problem 52

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
    char str1[100];
    gets(str1);
    char str2[100];
    int i,j;
    j=0;
    for(i=(strlen(str1)-1);i>=0;i--)
    {
        str2[j]=str1[i];
        j++;
    }
    str2[j]='\0';
    puts(str2);

    return 0;
}

Double click to view unformatted code.


Back to problem 52