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 keyword in c?
Tell me is null always defined as 0(zero)?
What are # preprocessor operator in c?
Are negative numbers true in c?
What is sizeof array in c?
What is ctrl c called?
How would you obtain the current time and difference between two times?
What is pointers in c with example?
Write a function that will take in a phone number and output all possible alphabetical combinations
What are the different categories of functions in c?
What is c++ used for today?
Are pointers really faster than arrays?
Differentiate abs() function from fabs() function.
How many levels deep can include files be nested?
What type of function is main ()?