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 difference between strcpy() and strncpy()?

1141


Why c++ is created?

1003


Is java made in c++?

1059


What is called array?

1079


How is data hiding achieved in c++?

1077


What is the difference between the compiler and the preprocessor?

1110


What are iterators in c++?

1009


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

3909


What is scope in c++ with example?

1109


How do you establish a has-a relationship?

1106


Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened

1559


Which should be more useful: the protected and public virtuals?

1032


Does c++ have foreach?

1046


How to get the current position of the file pointer?

1035


Is swift faster than go?

1094