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 dynamic dispatch in c++?
What is abstract data structure in c?
List the difference between a While & Do While loops?
What is typeof in c?
What is header file definition?
What are variables c?
Explain how do you print an address?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
write a program to copy the string using switch case?
What do you mean by Recursion Function?
Do you know the difference between exit() and _exit() function in c?
In which header file is the null macro defined?
What are the 5 types of organizational structures?
What is difference between union and structure in c?
What are inbuilt functions in c?