Laynetworks  
Web laynetworks.com Google
Home | Site Map | Tell a friends
Journal of Management
Management Tutorials
Download
Tutorials
History
Computer Science
Networking
OS - Linux and Unix
Source Code
Script & Languages
Protocols
Glossary
IGNOU
Quiz
About Us
Contact Us
Feedback
 
Sign up for our Email Newsletter
 
Get Paid for Your Tech Turorials / Tips

 

 

Home > Source Code > C program to check whether a String is Palindrome or not?
Page : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
C program to check whether a String is Palindrome or not?
 
C program to check whether a String is Palindrome or not?
Contributed by : Kaustubh Bagal
 
#include<stdio.h>
#include<string.h>
#define size 26

void main()
{
char strsrc[size];
char strtmp[size];

clrscr();
printf("\n Enter String:= "); gets(strsrc);

strcpy(strtmp,strsrc);
strrev(strtmp);

if(strcmp(strsrc,strtmp)==0)
printf("\n Entered string \"%s\" ispalindrome",strsrc);
else
printf("\n Entered string \"%s\" is not
palindrome",strsrc);
getch();
}
 
Page : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19