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


Please Help Members By Posting Answers For Below Questions

What is pointer in c?

731


What does 3 periods mean in texting?

591


how we can make 3d venturing graphics on outer interface

3994


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.

642


How to create struct variables?

584






What happens if a header file is included twice?

580


How can you tell whether a program was compiled using c versus c++?

613


Explain what is a pragma?

583


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)

1623


What is #ifdef ? What is its application?

640


How to establish connection with oracle database software from c language?

1669


Do you know the use of 'auto' keyword?

652


What is openmp in c?

604


Where are c variables stored in memory?

592


What is the significance of scope resolution operator?

847