palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / arup bhattacharya
#include<stdio.h>
#include<conio.h>
void main()
{
int n,r,temp;
int s=0;
clrscr();
printf("enter the number");
scanf("%d",&n);
temp=n;
while(temp>0)
{
r=temp%10;
s=s*10+r;
temp=temp/10;
}
if(n==temp)
printf(number is pallindrome");
else
printf("not pallindrome");
getch();
}
| Is This Answer Correct ? | 9 Yes | 8 No |
Post New Answer View All Answers
What is the advantage of c?
Explain how can I avoid the abort, retry, fail messages?
Explain what is the difference between far and near ?
What does double pointer mean in c?
Can a void pointer point to a function?
What is the difference between union and anonymous union?
What is the use of c language in real life?
Add Two Numbers Without Using the Addition Operator
What is double pointer?
What is array of pointers to string?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What is wrong in this statement?
What is the use of printf() and scanf() functions?
What is the explanation for the dangling pointer in c?
How will you delete a node in DLL?