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

Is empty stack c++?

936


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

954


What is switch case in c++ syntax?

1047


Can we define a constructor as virtual in c++?

1063


Define friend function.

977


What is format for defining a structure?

1029


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1157


What is flush () in c++?

1031


How do pointers work?

1126


Why is it called c++?

971


Is recursion allowed in inline functions?

1030


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

2019


What is implicit conversion/coercion in c++?

1354


What is a static member?

1000


How does list r; differs from list r();?

1084