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
Who developed c language and when?
Explain what is the difference between the expression '++a' and 'a++'?
Differentiate between declaring a variable and defining a variable?
What are the different properties of variable number of arguments?
Is sizeof a keyword in c?
Which is an example of a structural homology?
What are the restrictions of a modulus operator?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
What is a c token and types of c tokens?
What does %c mean in c?
Can a variable be both static and volatile in c?
What is far pointer in c?
Is malloc memset faster than calloc?
What is difference between Structure and Unions?
When should a type cast be used?