write program for palindrome
Answer Posted / felix
#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 ? | 182 Yes | 97 No |
Post New Answer View All Answers
Why is c++ awesome?
When should I use unitbuf flag?
What is null and void pointer?
Difference between overloaded functions and overridden functions
What are the uses of pointers?
How do you write a function that can reverse a linked-list?
Why do we need constructors in c++?
What are the advantages of using const reference arguments in a function?
What are structures and unions?
What is a forward referencing and when should it be used?
How do you define/declare constants in c++?
Why is swift so fast?
Is C++ case sensitive a) False b) Depends on implementation c) True
What is a pointer how and when is it used?
Which function cannot be overloaded c++?