write program for palindrome
Answer Posted / faiz misbah
#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 ? | 91 Yes | 84 No |
Post New Answer View All Answers
What are the important differences between c++ and java?
Do you know the use of vtable?
What are smart pointers?
What are c++ manipulators?
Is turbo c++ free?
What is auto used for in c++?
Where must the declaration of a friend function appear?
What character terminates all character array strings a) b) . c) END
Write about the retrieval of n number of objects during the process of delete[]p?
When must you use a pointer rather than a reference?
Can member functions be private?
What is the use of object in c++?
Which is best c++ or java?
Which c++ compiler is best?
What is the best c++ book?