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 / gaurav joshi garur (bageshwar)

#include<stdio.h> main()
{
int n, reverse = 0, temp; printf("Enter a number to check if it is a
palindrome or not\n");
scanf("%d",&n); temp = n; while( temp != 0 )
{
reverse = reverse * 10;
reverse = reverse + temp%10;
temp = temp/10;
} if ( n == reverse )
printf("%d is a palindrome number.\n", n);
else
printf("%d is not a palindrome number.\n",
n); return 0;
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are virtual functions in c++?

1123


What is ios class in c++?

1030


What does catch(…) mean?

1069


What are the four main data types?

1038


What is private public protected in c++?

983


Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.

1009


Which programming language is best?

937


What is static function? Explain with an example

1001


what do you mean by volatile variable?

986


What is the outcome of cout< a) 16 b) 17 c) 16.5

975


What is the difference between C and CPP?

1101


What doescout<<(0==0) print out a) 0 b) 1 c) Compiler error: Lvalue required

933


What does flush do c++?

1018


What are structs in c++?

971


Is eclipse good for c++?

994