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

#include<stdio.h>
#include<conio.h>

main()
{

char s1[10],s2[10];
int m,i,j;
scanf("%s",s1);
strcpy(s2,s1);
m=strlen(s1);
for(i=0,j=m-1;i<=m-1,j<=0;i++,j--)
{
if(s1[i]!=s2[j])
printf("STRING IS NOT PALINDROME ");
}
printf("STRING IS a PALINDROME ");
getch();
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is array give example?

1011


Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?

1053


Explain what are accessor methods?

1084


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

1012


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

997


What are iterators in c++?

980


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

1023


What is meant by a delegate?

1051


What is the extension of c++?

939


What is constant in c++ with example?

1109


Difference between declaration and definition of a variable.

1105


We use library functions in the program, in what form they are provided to the program?

1050


Is multimap sorted c++?

973


How can I learn c++ easily?

1032


How the delete operator differs from the delete[]operator?

1066