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
How many types of sorting are there in c?
Dont ansi function prototypes render lint obsolete?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What are the features of c language?
What is the right type to use for boolean values in c? Is there a standard type?
What is include directive in c?
What is the difference between NULL and NUL?
What is the basic structure of c?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How can you find the exact size of a data type in c?
Explain the difference between exit() and _exit() function?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
can we change the default calling convention in c if yes than how.........?
How many parameters should a function have?
Is int a keyword in c?