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
What is string in c language?
What is calloc()?
What is restrict keyword in c?
What is the difference between text and binary modes?
What is the main difference between calloc () and malloc ()?
Is it fine to write void main () or main () in c?
What is use of bit field?
What is hash table in c?
Do you have any idea about the use of "auto" keyword?
What is strcpy() function?
Can you explain the four storage classes in C?
Can we declare variables anywhere in c?
What are the primitive data types in c?
Explain what is the general form of a c program?
Why c is a mother language?