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

palindrome for strings and numbers----Can anybody do the
prog?

Answer Posted / harish

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[20],b[20];
int i;
clrscr();
printf("\n Enter the Number or String to find Palindrome");
scanf("%s",a);
strcpy(b,a);
strrev(a);
if(strcmp(a,b)==0)
{
printf("\n Entered data is Palindrome\n");
}
else
{
printf("\n Entered data is not a Palindrome\n");
}
getch();
}

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept and use of type void.

1059


Explain how do you determine the length of a string value that was stored in a variable?

1091


What is string function c?

967


I heard that you have to include stdio.h before calling printf. Why?

1006


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1013


What is a macro, and explain how do you use it?

1015


How do you declare a variable that will hold string values?

1104


Explain how can a program be made to print the line number where an error occurs?

1147


What is signed and unsigned?

1013


What is extern variable in c with example?

947


What is a floating point in c?

1005


Which is best book for data structures in c?

1038


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

1109


Explain how to reverse singly link list.

1070


Where are some collections of useful code fragments and examples?

1106