In C programming how can we check that the entered String is palindrome or not..?
In C programming how can we check that the entered String is palindrome or not..?
Basically, just check if the 0th (first) letter is equal to the last,
the 1st (second) equal to the one before last
...
the nth equal to the (last-n)th
...
until you've checked all of them (except maybe a single middle letter for strings with odd length).
firstly tell me how can i entered string..??
Wasn't that lesson #2 (lesson #1 being the famous "Hello, World!" program)?
Did you miss the class, maybe ...
Check the fgets() function. It is a safe way to get strings.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
thnx...
tell me the logic please...
qny described the logic in post #2.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)