palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / dally
#include<stdio.h>
int main()
{
int n,sum=0,temp;
printf("Enter nuber\n");
scanf("%d",&n);
temp = n;
while(n>1)
{
n = n%10;
sum = n + sum*10;
n = n / 10;
}
if(temp == sum)
printf("Given number is polindram\n");
else
printf("Given number is not polindram\n");
}
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
How can I find out how much free space is available on disk?
What does p mean in physics?
Compare array data type to pointer data type
What are the uses of null pointers?
Is c is a high level language?
What is a char c?
How variables are declared in c?
How many levels deep can include files be nested?
Can a variable be both constant and volatile?
Differentiate between full, complete & perfect binary trees.
What is the condition that is applied with ?: Operator?
What type is sizeof?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
can anyone suggest some site name..where i can get some good data structure puzzles???
What is default value of global variable in c?