Groovy hepcat Rod Pemberton was jivin' on Mon, 13 Mar 2006 15:17:09
-0500 in comp.lang.c.
Re: Can any one help me?'s a cool scene! Dig it!
"join" <h_*******@hotm ail-dot-com.no-spam.invalid> wrote in message
news:KI******* *************@g iganews.com...
but without using thr library from( string.h)
Your problem will be much easier to solve if you write functions to:
1) copy a string
2) reverse a string
3) compare a string
Merely reversing a copy of the string and comparing it to the
original won't work correctly. The problem, as stated, is to determine
whether a string a a palidrome. No definition of palindrome has been
given, so the general meaning is assumed. A palindrome is a sentence
or phrase whose letters spell the same thing forward or reverse.
The function should ignore white space and punctuation. It should
also ignore differences in case. The following is a palandrome, but is
not the same when reversed:
Was it a car or a cat I saw?
Besides, you don't really need to make a copy of the string. You
only have to compare (case insensitively) the first as-yet-uncompared
alphabetic (or alphanumeric) character to the last as-yet-uncompared
alphabetic (or alphanumeric) character. That's trivial (and a clue for
the OP).
Now, if the OP wants to provide a more restrictive definition of
palindrome for the purpose of this project, then it may make things
easier.
--
Dig the even newer still, yet more improved, sig!
http://alphalink.com.au/~phaywood/
"Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
I know it's not "technicall y correct" English; but since when was rock & roll "technicall y correct"?