palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / subbu
/*some corrections to above solution*/
#include<stdio.h>
#include<conio.h>
void main()
{
int n,r,temp;
int s=0;
printf("enter the number");
scanf("%d",&n);
temp=n;
while(temp>0)
{
r=temp%10;
s=s*10+r;
temp=temp/10;
}
if(n==s)
printf("number is pallindrome");
else
printf("not pallindrome");
getch();
}
Is This Answer Correct ? | 10 Yes | 5 No |
Post New Answer View All Answers
What is the use of getchar() function?
What are multidimensional arrays?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What are runtime error?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
Explain what will the preprocessor do for a program?
Why is structure padding done in c?
what is the difference between 123 and 0123 in c?
Why do we use c for the speed of light?
Explain about block scope in c?
difference between Low, Middle, High Level languages in c ?
How can I write a function that takes a format string and a variable number of arguments?
What is memory leak in c?
What are the __date__ and __time__ preprocessor commands?
FILE PROGRAMMING