palindrome for strings and numbers----Can anybody do the
prog?
Answer Posted / harish
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[20],b[20];
int i;
clrscr();
printf("\n Enter the Number or String to find Palindrome");
scanf("%s",a);
strcpy(b,a);
strrev(a);
if(strcmp(a,b)==0)
{
printf("\n Entered data is Palindrome\n");
}
else
{
printf("\n Entered data is not a Palindrome\n");
}
getch();
}
Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
How many types of errors are there in c language? Explain
How many types of operators are there in c?
Explain how do you list a file’s date and time?
Which is better pointer or array?
I need testPalindrome and removeSpace
#include
How many keywords (reserve words) are in c?
What is the difference between ++a and a++?
Write a program to use switch statement.
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
What is #include cctype?
What is the condition that is applied with ?: Operator?
What are the key features in c programming language?
Why is structure padding done in c?
What is a memory leak? How to avoid it?
How do you print an address?