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 / 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


Please Help Members By Posting Answers For Below Questions

Is it possible to provide special behavior for one instance of a template but not for other instances?

1128


Tell me can a pure virtual function have an implementation?

1023


How to declaring variables in c++?

1155


What are member functions used in c++?

1139


What is exception handling? Does c++ support exception handling?

1031


Show the declaration for a pointer to function returning long and taking an integer parameter.

1130


Write about the various sections of the executable image?

969


What do manipulators do?

1009


What is the two main roles of operating system?

1037


What does it mean to declare a member variable as static?

1054


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

1053


What is the best ide for c++?

1090


what is data encapsulation in C++?

1063


What is singleton pattern in c++?

990


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

993