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

What is the use of pointer in c++ with example?

802


Explain bubble sorting.

831


what are the iterator and generic algorithms.

1912


Is dev c++ a good compiler?

719


Distinguish between a # include and #define.

871


How can a struct in c++ differs from a struct in c?

812


What are references in c++? What is a local reference?

793


Write a Program to find the largest of 4 no using macros.

839


What is the best way to take screenshots of a window with c++ in windows?

819


What is the difference between containment and delegation?

981


What is object in c++ wikipedia?

766


What is encapsulation in c++?

935


What is c++ and its uses?

906


To what does “event-driven” refer?

832


Can a program run without main?

899