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
What is structure in c definition?
What do you mean by recursion in c?
What is calloc() function?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What are the two forms of #include directive?
What is null pointer in c?
How can I ensure that integer arithmetic doesnt overflow?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Where is volatile variable stored?
What is meant by realloc()?
Can you please explain the difference between syntax vs logical error?
What is volatile variable in c with example?
How to compare array with pointer in c?
What is the explanation for prototype function in c?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.