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
Is there any possibility to create customized header file with c programming language?
If I have a char * variable pointing to the name of a function ..
Can a pointer be volatile in c?
What is the difference between printf and scanf )?
Stimulate calculator using Switch-case-default statement for two numbers
please send me the code for multiplying sparse matrix using c
How does pointer work in c?
How to get string length of given string in c?
Difference between pass by reference and pass by value?
How can I copy just a portion of a string?
Write a program which returns the first non repetitive character in the string?
What is volatile variable in c?
What is the size of enum in bytes?
What do mean by network ?
How can you find the exact size of a data type in c?