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

Define anonymous class.

1017


Can you pass a vector to a function?

912


write a function signature with various number of parameters.

991


Is string an object in c++?

1108


What is runtime polymorphism in c++?

1097


C is to C++ as 1 is to a) What the heck b) 2 c) 10

1009


what do you mean by volatile variable?

987


Which coding certification is best?

973


Is arr and &arr are same expression for an array?

1002


Incase of a function declaration, what is extern means?

905


What is size of string in c++?

930


What are friend classes?

1018


Is c++ still in demand?

1109


How much is c++ certification?

996


What is the type of 'this' pointer? When does it get created?

913