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
Explain the concept and use of type void.
Explain how do you determine the length of a string value that was stored in a variable?
What is string function c?
I heard that you have to include stdio.h before calling printf. Why?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What is a macro, and explain how do you use it?
How do you declare a variable that will hold string values?
Explain how can a program be made to print the line number where an error occurs?
What is signed and unsigned?
What is extern variable in c with example?
What is a floating point in c?
Which is best book for data structures in c?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Explain how to reverse singly link list.
Where are some collections of useful code fragments and examples?