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 sorting algorithm does c++ use?

1088


What is the default width for ouputting a long integer using the insertion operator?

1194


Is it possible to provide special behavior for one instance of a template but not for other instances?

1066


What does obj stand for?

1101


Comment on local and global scope of a variable.

1091


How much is c++ certification?

1003


Why do we need c++?

993


What is the difference between a reference and a pointer?

1054


What character terminates all character array strings a) b) . c) END

1218


Differentiate between a constructor and a method in C++.

1003


What is this pointer in c++?

1325


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

1022


How can you quickly find the number of elements stored in a static array?

1058


Why is c++ considered difficult?

1104


an integer constant must have atleast one a) character b) digit c) decimal point

990