write program for palindrome
Answer Posted / amit
#include<iostream.h>
#include<conio.h>
main()
{
char c[8];
cout<<"enterd hte world of polindorom";
cin>>c;
int i=strlen(c);
i=i-1;
int flag=0;
for(int j=0;j<=1;j++)
{
if(c[j]==c[i])
{
flag=1;
}
else
{
int flag=0;
break;
}
}
i--;
if(flag==1)
{
cout<<"your option is polindorome";
}
else
{
cout<<"your option is not polindorome";
}
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a program to find the Fibonacci series recursively.
Why is c++ difficult?
What is an adaptor class in c++?
What is endianness?
True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends
Is c++ primer good for beginners?
What is cout flush?
What is abstract class in c++?
Can non-public members of another instance of the class be retrieved by the method of the same class?
Is C++ case sensitive a) False b) Depends on implementation c) True
How can you quickly find the number of elements stored in a static array?
Why do we need pointers?
Is it possible to provide special behavior for one instance of a template but not for other instances?
What is do..while loops structure?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300