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

Does c++ support multilevel and multiple inheritances?

948


what is the difference between overloading & overriding? give example.

1098


What is the use of string in c++?

970


what is a class? Explain with an example.

1096


Explain the concept of dynamic allocation of memory?

1043


Explain the isa and hasa class relationships. How would you implement each?

1061


What are signs of manipulation?

1009


What are static and dynamic type checking?

1022


What does std :: flush do?

1073


the first character in the variable name must be an a) special symbol b) number c) alphabet

1035


What is a singleton class c++?

965


What is the difference between set and map in c++?

1092


Is it possible for the objects to read and write themselves?

1051


Can we run c program in turbo c++?

1040


Explain the problem with overriding functions

1087