write program for palindrome
Answer Posted / baskaran
#include<stdio.h>
#include<string.h>
#define size 26
void main()
{
char strsrc[size];
char strtmp[size];
printf("\n Enter String:= ");
gets(strsrc);
strcpy(strtmp,strsrc);
strrev(strtmp);
if(strcmp(strsrc,strtmp)==0)
printf("\n Entered string \"%s\" is palindrome\n",strsrc);
else
printf("\n Entered string \"%s\" is not
Palindrome\n",strsrc);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What are the advantages of c++ over c?
What is the role of C++ shorthand's?
what is COPY CONSTRUCTOR and what is it used for?
Is nan a c++?
Is c++ double?
Explain 'this' pointer and what would happen if a pointer is deleted twice?
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
What is the use of this pointer in c++?
Why c++ is called oop?
What is atoi in c++?
Will c++ be replaced?
What is the difference between the functions memmove() and memcpy()?
What is const pointer and const reference?
What are the various arithmetic operators in c++?
Can we get the value of ios format flags?