Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
C palindrome program, c program for palindrome
SUBMITTED BY:
Guest
DATE:
Jan. 21, 2014, 11:22 p.m.
FORMAT:
Text only
SIZE:
412 Bytes
Raw
Download
Tweet
HITS:
1133
Go to comments
Report
#include <stdio.h>
#include <string.h>
int main()
{
char a[100], b[100];
printf("Enter the string to check if it is a palindrome\n");
gets(a);
strcpy(b,a);
strrev(b);
if( strcmp(a,b) == 0 )
printf("Entered string is a palindrome.\n");
else
printf("Entered string is not a palindrome.\n");
return 0;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus