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 pointer in c?
What does 3 periods mean in texting?
how we can make 3d venturing graphics on outer interface
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
How to create struct variables?
What happens if a header file is included twice?
How can you tell whether a program was compiled using c versus c++?
Explain what is a pragma?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is #ifdef ? What is its application?
How to establish connection with oracle database software from c language?
Do you know the use of 'auto' keyword?
What is openmp in c?
Where are c variables stored in memory?
What is the significance of scope resolution operator?