palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / arup bhattacharya
#include<stdio.h>
#include<conio.h>
void main()
{
int n,r,temp;
int s=0;
clrscr();
printf("enter the number");
scanf("%d",&n);
temp=n;
while(temp>0)
{
r=temp%10;
s=s*10+r;
temp=temp/10;
}
if(n==temp)
printf(number is pallindrome");
else
printf("not pallindrome");
getch();
}
| Is This Answer Correct ? | 9 Yes | 8 No |
Post New Answer View All Answers
what is reason of your company position's in india no. 1.
What is the hardest programming language?
Explain how can I pad a string to a known length?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
Write a c program to demonstrate character and string constants?
What is #include stdio h?
Explain the difference between getch() and getche() in c?
What is the benefit of using #define to declare a constant?
Why is c called "mother" language?
Write a code to generate divisors of an integer?
What's a good way to check for "close enough" floating-point equality?
What are the disadvantages of a shell structure?
Why doesnt this code work?
is it possible to create your own header files?
What does the format %10.2 mean when included in a printf statement?