write program for palindrome
Answer Posted / ashok
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int i,j,f=0;
char a[10];
clrscr (); // only works on windows
gets(a);
for (i=0;a[i]!='\0';i++)
{
}
i--;
for (j=0;a[j]!='\0';j++,i--)
{
if (a[i]!=a[j])
{
printf("string is not palindrome");
return(0);
}
}
printf("string is palindrome");
return(0);
}
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Explain register storage specifier.
What do you understand by pure virtual function? Write about its use?
daily Routine of father
What is the difference between cin.read() and cin.getline()?
Why c++ is faster than java?
Write a program in C++ for Fibonacci series
What is size of string in c++?
Describe the advantage of an external iterator.
give me an example for testing a program showing the test path .show how the test is important and complex.
What is token c++?
What are dynamic type checking?
How would you find out if a linked-list is a cycle or not?
Why is main an int?
How to declare a function pointer?
Are vectors faster than arrays?