C program to check whether a string is palindrome or not

Palindrome program

A string is said to be palindrome if it is exactly same as its reversed string.

Examples of palindrome – wow, madam, abcba etc,..

Using string functions

//Palindrome program
#include <stdio.h>
#include <string.h>
void main()
{
    char input[30];
    char rev[30];
    printf("Enter a string");
    gets(input);
    strcpy(rev,input);
    strrev(rev);
    if(strcmp(rev,input)==0)
        printf("%s is a palindrome",input);
    else
        printf("%s is not a palindrome",input);

}

Without string functions