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 operators are include in c language a) 4 b) 6 c) 8 d) 12
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
What is the use of void pointer and null pointer in c language?
What is multidimensional arrays
What is strcpy() function?
What is the code in while loop that returns the output of given code?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
For what purpose null pointer used?
What is #error and use of it?
to find the closest pair
What do you mean by recursion in c?
Explain enumerated types in c language?
Why calloc is better than malloc?
How can I split up a string into whitespace-separated fields?
Explain how can I right-justify a string?