Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write program for palindrome

Answer Posted / md. irshad alam

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
void main()
{
clrscr();
int palind(char []);
int r;
char name[5];
cout<<"Enter a String...";
gets(name);
r=pal(name);
if(r==0)
{
cout<<"\n"<<"PALINDROME...";
}
else
{
cout<<"\n"<<"NOT A PALINDROME...";
}
getch();
}
int palind(char name[])
{
char *p,*t;
p=name;
t=name+strlen(name)-1;
while(*p)
{
if(*p != *t)
{
return(1);
}
p++;
t--;
}
return(0);
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest c++ version?

1103


What are the steps in the development cycle?

1096


What does it mean to declare a destructor as static?

1082


What is the basic structure of c++ program?

1092


What is a rooted hierarchy?

1152


Explain the volatile and mutable keywords.

1066


Will a C compiler always compile C++ code a) Yes b) No c) Only optimized compilers

1043


what are the iterator and generic algorithms.

2150


Is python written in c or c++?

1139


How are the features of c++ different from c?

1087


What is meaning of in c++?

1210


What is the use of default constructor?

1089


What is a down cast?

1102


What is encapsulation in c++ with example?

993


Explain differences between new() and delete()?

1092