write program for palindrome
Answer Posted / nithya
#include<stdio.h>
#include<string.h>
main()
{
char str1[35];
char str2[35];
clrscr();
printf("Enter the string of words to check for
Palindrome or Not");
scanf("%s",&str1);
strcpy(str2,str1);
strrev(str2);
if(strcmp(str1,str2)==0)
printf("The entered string of words %s are
palindrome",str1);
else
printf("The entered string of words %s are not
palindrome",str1);
getch();
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is the difference between an enumeration and a set of pre-processor # defines?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
Can we use clrscr in c++?
What is a class definition?
Which ide is best for c++?
What data encapsulation is in c++?
How does class accomplish data hiding in c++?
Can create new c++ operators?
Is it possible to have a recursive inline function in c++?
Is c++ double?
Why do we need templates?
In what situations do you have to use initialization list rather than assignment in constructors?
Explain differences between new() and delete()?
What are maps in c++?
What is the purpose of ios::basefield in the following statement?