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 / mohammed arif khan

//MOHAMMED ARIF KHAN
// PROGRAM OF PALIDROM

#include<stdio.h>
#include<conio.h>
void main()
{
char str[20],*ptr,*ptr1;
int c=0;
clrscr();
printf("Enter the string:");
scanf("%s",&str);
for(ptr1=str;*ptr1!='\0';ptr1++);

ptr1--;
for(ptr=str;*ptr!='\0';ptr++,ptr1--)
{
if(*ptr!=*ptr1)
{
c=1;
break;
}
}
if(c==0)
{
printf("\n palindrome");
}
else
{
printf("\n not palindrome");
}
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I download c++?

974


What are the advantages of using typedef in a program?

1116


What is pair in c++?

1013


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

1129


What is a memory leak c++?

1078


What is the arrow operator in c++?

964


What is overloading unary operator?

1037


What is the use of ::(scope resolution operator)?

1030


List the issue that the auto_ptr object handles?

976


What is the difference between ++ count and count ++?

1103


What is copy constructor? Can we make copy constructor private in c++?

1042


What are the two types of polymorphism?

1075


Can we use pointers in c++?

1020


What's the hardest coding language?

955


Where are setjmp and longjmp used in c++?

1063