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

What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required

968


What are friend classes? What are advantages of using friend classes?

1105


What is helper in c++?

1087


what are the characteristics of Class Members in C++?

1041


Write about all the implicit member functions of a class?

1058


What is wrapper class in c++?

1110


What is this weird colon-member (" : ") syntax in the constructor?

1025


Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.

1323


What is a static element?

1068


What is the best ide for c++?

1091


Describe the process of creation and destruction of a derived class object?

1113


How are pointers type-cast?

1116


What is the main purpose of c++?

1062


Why do we use vector in c++?

1073


Is c better than c++?

1062