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

You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

1178


What's the most powerful programming language?

1061


What is a stack c++?

1025


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

1059


Why c++ is better than c language?

1029


Explain how overloading takes place in c++?

1060


What is an associative container in c++?

1080


Write a short code using c++ to print out all odd number from 1 to 100 using a for loop

1037


Why null pointer is used?

1058


What is the purpose of ios::basefield in the following statement?

1271


What are shallow and deep copy?

1134


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

1007


What are the three forms of cin.get() and what are their differences?

1254


Can I make ios apps with c++?

1065


Which c++ compiler is best?

1170