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
How to declare a variable?
Difference between macros and inline functions? Can a function be forced as inline?
Where static variables are stored in c?
Who developed c language and when?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
How does placing some code lines between the comment symbol help in debugging the code?
What is hungarian notation? Is it worthwhile?
What is the importance of c in your views?
Explain how to reverse singly link list.
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
What are two dimensional arrays alternatively called as?
What are void pointers in c?
Can a local variable be volatile in c?
What is volatile variable how do you declare it?
What is an lvalue?