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 null c++?

1147


Is c++ a programming language?

1087


Explain about Garbage Collector?

1125


What is the difference between *p++ and (*p)++ ?

1366


Define a nested class. Explain how it can be useful.

1087


What are the five basic elements of a c++ program?

1119


Is there any difference between int [] a and int a [] in c++?

1027


What is the difference between prefix and postfix versions of operator++()?

1087


How can I learn dev c++ programming?

1065


Explain the difference between abstract class and interface in c++?

994


What is isdigit c++?

1106


What is the use of endl in c++ give an example?

1175


write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)

2392


Does c++ support exception handling?

1073


What is the difference between object-oriented programming and procedural programming?

1239