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

.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }

2004


formula to convert 2500mmh2o into m3/hr

501


How many bytes are occupied by near, far and huge pointers (dos)?

678


What are runtime error?

634


What does s c mean on snapchat?

590






Why c is called free form language?

575


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1528


how do you execute a c program in unix.

641


What are the parts of c program?

640


How can I do graphics in c?

597


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

786


what are the 10 different models of writing an addition program in C language?

1443


Does c have circular shift operators?

734


What is a constant and types of constants in c?

606


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

631