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 / mojib khan

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str1[30],str2[30];
int l;
clrscr();
printf("Enter the string \t");
gets(str1);
strrev(str1);//for reverse string
strcpy(str1,str2);//copy str1 to str2
l=strcmp(str2,str1); //comparing strings it will return 0/1
if(l==0)
{
printf("\nString is Palindrom");
}
else
printf("String is not palindrom");
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the benefit of c++?

1202


Differentiate between realloc() and free().

1101


What are the storage qualifiers?

1217


what are the iterator and generic algorithms.

2008


Can we use this pointer in a class specific, operator-overloading function for new operator?

1149


Write bites in Turbo c++ Header ("Include") Files.

1333


Should I learn c or c++ first?

1180


Where can I run c++ program?

1111


What are the important differences between c++ and java?

1201


What is the difference between reference and pointer?

1227


What are namespaces in c++?

1139


What are the various storage classes in C++?

1185


why and when we can declar member fuction as a private in the class?

2137


What is the difference between delegation and implemented-in-terms-of?

1055


What are register variables?

1215