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 does. int *x[](); means ?
What are data types in c language?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is union in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
#include
What is a stream?
What is the purpose of scanf() and printf() functions?
p*=(++q)++*--p when p=q=1 while(q<=6)
What is static memory allocation? Explain
What is wrong with this program statement?
Explain how can you restore a redirected standard stream?
Difference between MAC vs. IP Addressing
Explain the use of bit fieild.
What is cohesion in c?