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


Please Help Members By Posting Answers For Below Questions

Why is c++ awesome?

565


When should I use unitbuf flag?

575


What is null and void pointer?

583


Difference between overloaded functions and overridden functions

568


What are the uses of pointers?

564






How do you write a function that can reverse a linked-list?

559


Why do we need constructors in c++?

603


What are the advantages of using const reference arguments in a function?

603


What are structures and unions?

564


What is a forward referencing and when should it be used?

570


How do you define/declare constants in c++?

598


Why is swift so fast?

612


Is C++ case sensitive a) False b) Depends on implementation c) True

608


What is a pointer how and when is it used?

565


Which function cannot be overloaded c++?

571