know the personalities
hold your mouse,move left and right

Program to count number of palindrome in the words


job detailsFree Publishing of valuable information(s) in our website-Procedure to submit detailsjob details

Free Publishing of your College/University function details


Free Publishing of Your College/University function details in our website.Please send details to following email ids


technicalsymposium@gmail.com.
technicalsymposium@in.com.
technicalsymposium@yahoo.com.
technicalsymposium@hotmail.com.
Google Groups

Get Free E-Mail Alerts Daily

Get Daily Job/EntranceExam/Scholarships/
Admission/Competitive Exam Details Symposium/Conference Alerts in your email

Please Enter your email id and go to your inbox and confirm.You will be a member in our group.

Email:
Visit this group

Freshers Jobs/Symposium/Conference/Certification &Education News Given Below-Get Now

Freshers Jobs and IT /Govt Jobs

Symposium and Conference Details

Free Lecture Notes

Free Placement Papers

Free Project Codings


                

/* pgm to count no. of palindrome in the words*/
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<ctype.h>
void main()
{
char word[200],temp[100],temp2[100];
int i,j,l,pos[10],count=0;
clrscr();
printf("\n\n\tPROGRAM TO COUNT THE NUMBER OF PALINDROME IN THE GIVE STRING\n\n");
printf("\n\n\t\tENTER THE STRING : ");
scanf("%[^\n]",word);
printf("\n\n\t\tGIVEN WORD : %s",word);
for(i=0;i<strlen(word);i++)
{
l=i;
for(j=0;(!isspace(word[i])) && word[i]!='\0';j++,i++)
temp[j]=word[i];
temp[j]='\0';
strcpy(temp2,temp);
strrev(temp2);
if(strcmp(temp,temp2)==0)
pos[count++]=l;
if(word[j]=='\0')
break;
}
if(count)
{
printf("\n\n\tNumber of palindrome in the given string : %d",count);
printf("\n\n\tThey occur in the following position(s) : \n\n");
for(i=0;i<count;i++)
printf("\t%d",pos[i]+1);
}
else
printf("\n\nNO PALINDROME FOUND IN THE GIVEN STRING \n\n");
getch();
}

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright 2009 All rights are reserved to technicalsymposium.com