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 A PROGRAM TO FIND A REVERSE OF TWO NO

Answer Posted / selvakumar

#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,b=0,c;
printf("\nEnter any number : ");
scanf("%d",&n);
c=n;
while(n!=0)
{
a = n%10;
b = (b*10)+a;
n = n/10;
}
if(b==c)
printf("\nPalindrome no");
else
printf("\nNot a palindrome no");
printf("\nReverse of the number is %d",b);
getch();
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State the difference between x3 and x[3].

1118


Differentiate between new and malloc(), delete and free() ?

1192


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4283


Explain how can you avoid including a header more than once?

1099


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1383


Explain about the functions strcat() and strcmp()?

1061


Explain what is the difference between functions getch() and getche()?

1063


Why c is a procedural language?

1084


What is c programing language?

1095


How can you convert integers to binary or hexadecimal?

1041


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

1108


How main function is called in c?

1135


Can the sizeof operator be used to tell the size of an array passed to a function?

1121


Should I learn data structures in c or python?

1032


Why array is used in c?

1026