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

#include<stdio.h>

void main()
{
int i=0,l,flag=0;
char str[30];
clrscr();
printf("Enter the string\n");
gets(str);
l=strlen(str)-1;
while(i<=l)
{
if(str[i]==str[l])
flag=1;
else
{
flag=0;
break;
}
i++;
l--;
}
if(flag==1)
printf("String is palindrom");
else
printf("\n String is not palindrom");
getch();
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between overloading vs. Overriding

1025


What is the history of c++?

998


Does there exist any other function which can be used to convert an integer or a float to a string?

1029


What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.

998


Differentiate between a pointer and a reference with respect to c++.

1182


Why do we learn c++?

906


What do the header files usually contains?

1000


What is ios flag in c++?

1125


What is an undefined reference/unresolved external symbol error and how do I fix it?

1078


What is polymorphism and its type in c++?

1015


How does a copy constructor differs from an overloaded assignment operator?

966


what Is DCS ? what i will get benefit when i did?

2304


In the derived class, which data member of the base class are visible?

1069


How many different levels of pointers are there?

1150


There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

2941