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 are the advantages and disadvantages of a heap?
What is typedf?
Explain the difference between getch() and getche() in c?
How can I write functions that take a variable number of arguments?
Explain how can I remove the trailing spaces from a string?
What the advantages of using Unions?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Difference between Shallow copy and Deep copy?
Define recursion in c.
What is a nested formula?
Explain what is wrong with this program statement? Void = 10;
How many data structures are there in c?
The __________ attribute is used to announce variables based on definitions of columns in a table?
find the sum of two matrices and WAP for it.
write a programming in c to find the sum of all elements in an array through function.