write program for palindrome
Answer Posted / prakash
#include<stdio.h>
#include<conio.h>
main()
{
char s1[10],s2[10];
int m,i,j;
scanf("%s",s1);
strcpy(s2,s1);
m=strlen(s1);
for(i=0,j=m-1;i<=m-1,j<=0;i++,j--)
{
if(s1[i]!=s2[j])
printf("STRING IS NOT PALINDROME ");
}
printf("STRING IS a PALINDROME ");
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What are the different types of polymorphism in c++?
Is c++ a dying language?
List the advantages of inheritance.
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
Is java easier than c++?
What is the use of this pointer in c++?
How many types of scopes are there in c++?
What is an inclusion guard?
Which is not a valid keyword a) public b) protected c) guarded
Declare a class vehicle and make it an abstract data type.
What are the various storage classes in C++?
What do you mean by funtion prototype?
What are built-in functions? What is the syntax for the definition?
Write a function to find the nth item from the end of a linked list in a single pass.
What is the use of 'using' declaration in c++?