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 / chintan

#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char *a,*b,s1[10],s2[10];
cout<<"\n ENTER THE STRING : ";
cin>>s1;
strcpy(s2,s1);
a=s1;
b=s2;
strrev(s2);
cout<<s2;
if(strcmp(a,b))
cout<<" \n STRING IS NOT PALINDROME ";
else
cout<<" \n STRING IS PALINDROME ";
getch();
}

Is This Answer Correct ?    35 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is const in c++?

1065


What are namespaces in c++?

1034


Should the this pointer can be used in the constructor?

975


What happens if a pointer is deleted twice?

1225


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2583


Is c++ still being used?

969


What is the disadvantage of using a macro?

1053


Differentiate between structure and class in c++.

1022


Is java a c++?

981


How do you master coding?

987


What are the differences between malloc() and calloc()?

1109


A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.

2138


Explain the concept of copy constructor?

988


Do we have to use initialization list in spite of the assignment in constructors?

940


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

2024