palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / sree
#include<stdio.h>
void main
{
int n,t,d,r;
printf("Enter the number:");
scanf("%d",&n);
t=n;
while(n>=1)
{
d=n%10;
r=(r*10)+d;
n=n/10;
}
if(t==r)
printf("Palindrome");
else
printf("Not a palindrome");
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
any "C" function by default returns an a) int value b) float value c) char value d) a & b
explain what is fifo?
What the advantages of using Unions?
Explain what’s a signal? Explain what do I use signals for?
What are the types of bitwise operator?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
What are the key features in c programming language?
What is structure in c explain with example?
How does struct work in c?
What does the file stdio.h contain?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
What are variables c?
Do you know pointer in c?
Why is it important to memset a variable, immediately after allocating memory to it ?
Give the rules for variable declaration?