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
Do variables need to be initialized?
How pointer is different from array?
What is volatile c?
What extern c means?
What are the key features in c programming language?
Explain what does a function declared as pascal do differently?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is character constants?
What is #line?
What is typedef struct in c?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
Explain what are the advantages and disadvantages of a heap?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
Explain logical errors? Compare with syntax errors.
write a program to concatenation the string using switch case?