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
Define anonymous class.
Can you pass a vector to a function?
write a function signature with various number of parameters.
Is string an object in c++?
What is runtime polymorphism in c++?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
what do you mean by volatile variable?
Which coding certification is best?
Is arr and &arr are same expression for an array?
Incase of a function declaration, what is extern means?
What is size of string in c++?
What are friend classes?
Is c++ still in demand?
How much is c++ certification?
What is the type of 'this' pointer? When does it get created?