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

a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

656


Stimulate calculator using Switch-case-default statement for two numbers

2446


Is python a c language?

550


What are linker error?

614


Explain how do you sort filenames in a directory?

603






Why is a semicolon (;) put at the end of every program statement?

624


Can a pointer be null?

560


What does printf does?

742


What is the difference between the = symbol and == symbol?

624


the question is that what you have been doing all these periods (one year gap)

1617


What is the function of volatile in c language?

664


What is a lookup table in c?

626


What is a MAC Address?

626


How do you redirect a standard stream?

622


What does the c preprocessor do?

619