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
State the difference between x3 and x[3].
Differentiate between new and malloc(), delete and free() ?
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
Explain how can you avoid including a header more than once?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Explain about the functions strcat() and strcmp()?
Explain what is the difference between functions getch() and getche()?
Why c is a procedural language?
What is c programing language?
How can you convert integers to binary or hexadecimal?
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
How main function is called in c?
Can the sizeof operator be used to tell the size of an array passed to a function?
Should I learn data structures in c or python?
Why array is used in c?