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
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
What is fixed in c++?
What is the difference between global variables and local variable
What are the advantages of c++?
What is ctime c++?
Why struct is used in c++?
Define whitespace in C++.
What is c++ 11 and c++ 14?
What's the most powerful programming language?
Difference between delete and free.
What is the use of class in c++?
Why should we use null or zero in a program?
Specify some guidelines that should be followed while overloading operators?
Do we have to use initialization list in spite of the assignment in constructors?
Difference between strdup and strcpy?