Palindrome For String And Numbers

Palindrome Checking Using C:

#include <stdio.h>
#include <conio.h>
#include <string.h>
#define size 26
 
void main()
{
char strsrc[size];
char strtmp[size];
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();
}

Popularity: 1% [?]

Related posts:

  1. how to find a string within a string
  2. Encrypting string value using MD5 in PHP
  3. Javascript compare two numbers
You can leave a response, or trackback from your own site.

Leave a Reply

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars