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
How do I start a c++ project?
When does the c++ compiler create temporary variables?
What is struct c++?
What does floor mean in c++?
what is c++
Write a program to add three numbers in C++ utilizing classes.
What is an inline function in c++?
How do you show the declaration of a virtual constructor?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
What is the best way to take screenshots of a window with c++ in windows?
What are the defining traits of an object-oriented language?
What is a multimap c++?
What is operators in c++?
What is double in c++?
What is the most common mistake on c++ and oo projects?