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
Explain linked list using c++ with an example?
What language does google use?
Is c++ primer good for beginners?
Explain "const" reference arguments in function?
What are enumerations?
What is rvalue?
Explain binary search.
Which c++ compiler is best?
What is iterator c++?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What is object file? How can you access object file?
Is python written in c or c++?
What is setiosflags c++?
Write a program to find the Fibonacci series recursively.
What are disadvantages of pointers?