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

Explain the difference between using macro and inline functions?

1121


Does a derived class inherit or doesn't inherit?

1085


What are the restrictions apply to constructors and destructors?

1079


Differentiate between C and C++.

1240


What is an adjust field format flag?

1110


Explain terminate() function?

1048


What are the differences between java and c++?

1072


Is sorted c++?

1102


What is extern c++?

1003


What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack

1080


Explain method of creating object in C++ ?

1104


Define Virtual function in C++.

1087


How to give an alternate name to a namespace?

1080


Can constructor be static in c++?

1106


What is the use of setprecision in c++?

1009