write program for palindrome
Answer Posted / anirban
#include<stdio.h>
#include<string.h>
#define size 26
void main()
{
char strsrc[size];
char strtmp[size];
clrscr();
printf("\n Enter String:= "); gets(strsrc);
strcpy(strtmp,strsrc);
strrev(strtmp);
if(strcmp(strsrc,strtmp)==0)
printf("\n Entered string \"%s\" ispalindrome",strsrc);
else
printf("\n Entered string \"%s\" is not
palindrome",strsrc);
getch();
}
| Is This Answer Correct ? | 12 Yes | 13 No |
Post New Answer View All Answers
If a header file is included twice by mistake in the program, will it give any error?
What is the most powerful coding language?
Is turbo c++ free?
What new()is different from malloc()?
What is a pointer with example?
What is the difference between structure and class?
Explain all the C++ concepts using examples.
Why are pointers used?
What is a dangling pointer in c++?
What programming language should I learn first?
Write about the retrieval of n number of objects during the process of delete[]p?
How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?
What is setw manipulator in c++?
Why null pointer is used?
Can manipulators fall in love?