Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do I start a c++ project?

999


When does the c++ compiler create temporary variables?

986


What is struct c++?

947


What does floor mean in c++?

1015


what is c++

2307


Write a program to add three numbers in C++ utilizing classes.

1054


What is an inline function in c++?

1066


How do you show the declaration of a virtual constructor?

897


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

954


What is the best way to take screenshots of a window with c++ in windows?

992


What are the defining traits of an object-oriented language?

1134


What is a multimap c++?

1136


What is operators in c++?

953


What is double in c++?

993


What is the most common mistake on c++ and oo projects?

926