palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / sree
#include<stdio.h>
void main
{
int n,t,d,r;
printf("Enter the number:");
scanf("%d",&n);
t=n;
while(n>=1)
{
d=n%10;
r=(r*10)+d;
n=n/10;
}
if(t==r)
printf("Palindrome");
else
printf("Not a palindrome");
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Write a code to generate a series where the next element is the sum of last k terms.
What is a substring in c?
Why do we use main function?
Write a code of a general series where the next element is the sum of last k terms.
What does it mean when a pointer is used in an if statement?
What is #define in c?
What is malloc return c?
State the difference between realloc and free.
Why doesnt the call scanf work?
What is a built-in function in C?
What is the difference between Printf(..) and sprint(...) ?
What does %2f mean in c?
What are terms in math?
what value is returned to operating system after program execution?
How is a macro different from a function?