Saturday, May 22, 2010

A C program that will accept string as input and display if the string is palindrome or not.?

A C program that will accept string as input and display if the string is palindrome or not.

A C program that will accept string as input and display if the string is palindrome or not.?
hi its very easy ,


i am sending u the method for this try it and i will also mail you source code later on


{


1. ask for a string from user and store it in memory(say a[25])


2. now copy the reverse of string in another array of character(say b[20] with help of for loop)


3. Now use the strcmp command for both the arrays (strcmp(a,b))


4.if it returns 0 then print string is palindrome else print string is not palindrome.


}


No comments:

Post a Comment