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...

Print all the palindrome numbers.If a number is not
palindrome make it one by attaching the reverse to it.
eg:123
output:123321 (or) 12321

Answer Posted / kifle tadesse mit

1# include<stdio.h>
2 int main()
3 {
4 int n,n1,rem,rev=0;
5 printf("enter the number u want to reverse\n");
6 scanf("%d",&n);
7n1=n;
8 while(n>0)
9{
10 rem=n%10;
11 rev=rev*10+rem;
12 n=n/10;
13 }
14 if(n1==rev)
15 printf("the given no is palindrome");
16 else
17 {
18 printf("no is not palindrome\n");
19 printf(" its palindrome by attaching it's reverse is
%d%d\n",n1,rev);
20 }return 0;
21 }

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What should malloc(0) do?

1188


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1131


What extern c means?

1063


How many types of operators are there in c?

1088


What are the modifiers available in c programming language?

1280


Explain the ternary tree?

1078


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

1224


How macro execution is faster than function ?

1250


can we have joblib in a proc ?

2387


Explain union. What are its advantages?

1127


Can we replace the struct function in tree syntax with a union?

1353


What is this pointer in c plus plus?

1143


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

1141


Explain what is the difference between a free-standing and a hosted environment?

1239


What does 1f stand for?

1237