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

Do vectors start at 0 c++?

720


Which software is best for c++ programming?

753


What new()is different from malloc()?

779


In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that

817


Which is best c++ or java?

827






What is the use of string in c++?

724


What are the benefits of pointers?

747


What is c++ best used for?

758


What is the advantage of c++ over c?

734


What are the advantages of inheritance in c++?

837


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

824


Explain what are mutator methods in c++?

746


How the delete operator differs from the delete[]operator?

831


What does floor mean in c++?

770


What is data types c++?

739